|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-19 09:07 UTC] tony2001@php.net
[2006-12-19 19:28 UTC] ceo at l-i-e dot com
[2006-12-19 19:47 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 09:00:01 2025 UTC |
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: