ID: 39880
User updated by: ceo at l-i-e dot com
Reported By: ceo at l-i-e dot com
-Status: Feedback
+Status: Open
Bug Type: IMAP related
Operating System: Windows
PHP Version: 5.2.0
New Comment:
So I should be bugging the IMAP folks?
Some c-client (whatever that is) folks?
I have no idea what you're asking for, actually.
All I know is, the function works as documented in Linux, and fails to
work as documented in Windows.
Doesn't seem like it should be rocket science to read a simple text
file instead of opening up a network connection and all that...
What am I missing here?
I'm happy to take this issue elsewhere, but it's a Black Box to me, and
imap_open() is my only doorway.
Previous Comments:
------------------------------------------------------------------------
[2006-12-19 09:07:24] [EMAIL PROTECTED]
This is what I see - the underlying c-client function is unable to open
a file. Right?
Why do you think it's PHP problem?
------------------------------------------------------------------------
[2006-12-18 22:29:18] ceo at l-i-e dot com
Description:
------------
imap_open('/localfile', '', '')
fails on Windows, but works on Linux.
I get this in the error log for Windows:
[Mon Dec 18 16:18:56 2006] [error] [client 127.0.0.1] PHP Warning:
imap_open() [<a href='function.imap-open'>function.i
map-open</a>]: Couldn't open stream
C:/www/complaints.com/data/testdos.mbox in
C:\\www\\complaints.com\\imap_bug.php on
line 9
[Mon Dec 18 16:18:56 2006] [error] [client 127.0.0.1] PHP Notice:
Unknown: Can't open mailbox C:/www/complaints.com/dat
a/testdos.mbox: no such mailbox (errflg=2) in Unknown on line 0
Note that it's neither a path nor permissions problem, as fopen(...,
'r') and fgets() succeed.
Also note that it is not a cr/lf problem as the testunix.mbox and
testdos.mbox files are identical except for ^M at the ends.
Linux happily works with either line-ending.
Windows just plain doesn't work.
The Linux box is running 5.1.4, while the Windows is running 5.2.0, so
it *could* be a change from 5.1.4 to 5.2.0
Reproduce code:
---------------
http://acousticdemo.com/complaints/imap_bug.phps
Expected result:
----------------
Linux Output:
http://acousticdemo.com/complaints/imap_bug.php
Actual result:
--------------
Line 1 of testdos.mbox: From "Richard Lynch" Fri Dec 15 17:13:48 2006
Line 1 of testunix.mbox: From "Richard Lynch" Fri Dec 15 17:13:48 2006
Failed to imap_open(C:/www/complaints.com/data/testdos.mbox)
array(1) {
[0]=>
string(75) "Can't open mailbox
C:/www/complaints.com/data/testdos.mbox: no such mailbox"
}
bool(false)
messages in C:/www/complaints.com/data/testdos.mbox:
bool(false)
bool(false)
Failed to imap_open(C:/www/complaints.com/data/testunix.mbox)
bool(false)
array(1) {
[0]=>
string(76) "Can't open mailbox
C:/www/complaints.com/data/testunix.mbox: no such mailbox"
}
messages in C:/www/complaints.com/data/testunix.mbox:
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39880&edit=1