php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16562 imap_open does not open port after PHP upgrade
Submitted: 2002-04-11 23:29 UTC Modified: 2002-04-12 13:11 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: php dot net at actionweb dot com Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.1.2 OS: RedHat 6.x
Private report: No CVE-ID: None
 [2002-04-11 23:29 UTC] php dot net at actionweb dot com
After upgrading to PHP 4.1.2 from 4.0.4pl1 and doing this:

imap_open("{hostname/POP3:110}INBOX", "userid", "password")

...simply returns "Couldn't open stream" when trying to talk to POP3/110.  I checked tcpdump and I see nothing happening on port 110.  Switching back to 4.0.4pl1 fixes the problem.  Tried installing the latest c-client and still nothing.  Seems something about imap_open has been broken in this version.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-12 10:44 UTC] sniper@php.net
What if you use this instead:

$mbox = imap_open ("{localhost:110/pop3}INBOX", "user_id", "password");

(straight from the manual)

 [2002-04-12 12:23 UTC] php dot net at actionweb dot com
I thought I'd tried that already, but there must have been something else wrong when I did, because that fixed it. Thanks.  :-)

Side note... the reason I was trying it that way is because that's how NOCC v.0.92 (see http://sourceforge.net/projects/nocc/ )was successfully doing it.  I guess the syntax for imap_open isn't as flexible as it used to be.  My guess is that they've fixed NOCC in later versions and that's why no one else seems to be having this problem.

It's always a bummer when something that worked in a previous version of PHP stops working in the current one. But, as it stands, I guess that's not PHP's problem... this is a NOCC bug.  Unfortunately, I've got to go track down dozens of old NOCC installations (on lots of different servers) and fix the syntax to the way the current PHP wants to see it. :-(
 [2002-04-12 12:52 UTC] mfischer@php.net
Actually it's the imap library whose syntax did change, not PHP itself.
 [2002-04-12 12:54 UTC] php dot net at actionweb dot com
Additional note: I did some more experimenting and it turns out that the current PHP does NOT have a problem with this syntax:

imap_open("{hostname/pop3:110}INBOX", "userid", "password")

...which is the same syntax NOCC v.9.2 used with the exception that "pop3" is lower case.  

In summary, in previous versions of imap_open() the protocol specifier was not case sensitive.  Now it is.
 [2002-04-12 12:58 UTC] php dot net at actionweb dot com
Oops... I didn't see mfischer@php.net's comment.  Perhaps it is in the imap libary, but what's strange is I tried using the same library that I used with the prior PHP version and it still had a problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 16:01:31 2024 UTC