On Sat, December 16, 2006 4:02 am, Jochem Maas wrote:
> Richard Lynch wrote:
>> I'm having trouble with Windows imap_open.
>>
>> I have the exact same mbox on a Linux box, with the exact same PHP
>> code opening it just fine.
>>
>> I FTP (binary) to the Windows box (and a second time to be sure it
>> wasn't an FTP flake-out).
>>
>> Opening the mbox in Windows yields a message like:
>> PHP Notice:
>> Unknown:
>> C:\\data\\mbox.excerpt (file C:\\data\\mbox.excerpt) is not in valid
>> mailbox format (errflg=2)
>
> LONG SHOT: the path is freaking imap_open out - maybe it can be
> tricked
> by using a path like so '/data/mbox.excerpt' (which windows should
> swallow -
> although it assumes C: is the default drive [I think])

Tried that.

Would never have expected C: to be a default, but shows what I know.

Didn't help.

> other than that I can only think to switch the line-endings in the
> mbox file
> (at least to rule out the line ending as the problem)?!

Linux is happy to take either line-ending.
Windows just plain doesn't work.
:-v

>> Can somebody point me to anything that would de-mystify (errflg = 2)
>> in the error message?
>> Obviously that '2' has SOME kind of meaning, but is that from PHP,
>> IMAP, Windows OS, File System, ...?
>
> I think the errflg is coming from IMAP ... I have found several bits
> of C code related to IMAP (and seemingly nothing to do with php)
> that reference 'errflg' - I have also found
> that a value of 2 for errflg can mean anything from 'invalid mbox
> format'
> to 'authentication failed'  (not very helpful!)
>
> what do these functions return for you?:
>
> imap_errors(),        imap_alerts(), imap_last_error()

imap_errors():
Can't open mailbox
C:/www/complaints.com/data/testunix.mbox: no such mailbox

HTTP Error Log:
Couldn't open stream
C:/www/complaints.com/data/testdos.mbox in
C:\\www\\complaints.com\\imap_bug.php on
line 9

Unknown: Can't open mailbox C:/www/complaints.com/dat
a/testdos.mbox: no such mailbox (errflg=2) in Unknown on line 0

http://bugs.php.net/bug.php?id=39880

Looks like it's time to just dual boot and abandon Windows. (again).
:-v

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to