php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #916 Accessing IMAP in Windows causes "invalid remote specification" error
Submitted: 1998-11-13 19:21 UTC Modified: 1998-11-30 13:11 UTC
From: mpg at squish dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.5 OS: Windows NT, 95, 98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mpg at squish dot com
New email:
PHP Version: OS:

 

 [1998-11-13 19:21 UTC] mpg at squish dot com
Hello, and kudos to the PHP team

This is similar to BugID #898; sorry to post "again", but it didn't look like there
was much info to go on in that report, hopefully this additional info will help:

* Summary:
---------------
Trying to access an IMAP server via PHP under Windows (all versions 
apparently, WinNT 3.51, 4, 95, 98) causes "invalid remote specification"
and "couldn't open stream" errors.

* Details:
-------------
I've installed PHP 3.0.5 for Win32 on NT 3.51 and 95, and then installed
the latest IMP webmail program for accessing IMAP mail servers (available
at http://web.horde.org/imp/ ).  When I try to access a test mail account,
I get the following errors:
Warning: Can't open mailbox {www.squish.com:143}INBOX: invalid remote specification in ./lib/imp.lib on line 203
Warning: Couldn't open stream {www.squish.com:143}INBOX in ./lib/imp.lib on line 203
Warning: Uninitialized variable or array index or property (mbox) in ./lib/imp.lib on line 204

The lines in question from imp.lib are below (I've numbered the lines of course...):
198 /* make sure the user has a valid login; if so, return an imap stream */
199
200  function validate_login($server, $port, $mailbox, $user, $pass) {
201  global $sidebar;
202  
203  if (! ($mbox = imap_open("{$server:$port}$mailbox", $user, $pass)) ) {
204    if (!$sidebar) {
205      echo '<script language=javascript>
206            window.location="login.php3?reason=timeout";
207  	    </script>
208	    ';
209    }
210  }
211  return $mbox;
212}

* Additional info:
--------------------
- I've found four other Win32 users experiencing the exact same problem with
  essentially the same setup: PHP 3.0.5, Win, IMP, and either IIS or O'Reilly 
  WebSite Pro web servers, so it appears the Win environment is involved.
- Loose consensus is the problem is in the PHP IMAP module "php3_imap4r2.dll"
- You can "experience" the problem at http://www.squish.com/imp/index.html
  by using "test" as username and "Guest" as password.
- I am able to login successfully to that same test account from the IMP web site, 
  at http://web.horde.org/cvs/imp/ which I believe is run on a Linux box.

I've tried everything I can think of, but I'm new to PHP so that's not much  ;-)
Thanks for your time and efforts.  Good luck!
Regards,
Mike

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-30 13:11 UTC] rasmus
This has been fixed in the CVS sources.  Should work fine in 3.0.6.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 14:01:37 2025 UTC