FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Parsing mbox files with Windows Php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Parsing mbox files with Windows Php [message #181718 is a reply to message #181715] Mon, 27 May 2013 16:08 Go to previous messageGo to previous message
Christoph Becker is currently offline  Christoph Becker
Messages: 91
Registered: June 2012
Karma:
Member
Jerry Stuckle wrote:
On 5/27/2013 9:25 AM, Christoph Becker wrote:
> Jerry Stuckle wrote:
>>
>> Chuck has posted the code that fails on Windows, but works on Linux, and
>> posted the according error messages.
>>
>
> He has not posted matching code and error messages.

In <news:knreb5$roc$1(at)dont-email(dot)me> Chuck Anderson wrote:

> I have tried:
> imap_open('localhost/imap/mboxfiles/Trash', '', ''); // equivalent of
> being relative to $HOME on *nix
> imap_open('/imap/mboxfiles/Trash', '', ''); // absolute path from
> document root
> imap_open('mboxfiles/Trash', '', ''); // relative path
> imap_open('c:/localhost/imap/mboxfiles/Trash', '', ''); // real path
> on disk
>
> On Windows I always get these two errors (the file path changes
> accordingly):
>
> - Warning: imap_open(): Couldn't open stream localhost/utilities
> /imap/eml/Trash in localhost\utilities\imap\imap_save_mbox_file.php
> on line 127
>
> - Notice: Unknown: Can't open mailbox localhost/utilities/imap/eml
> /Trash: no such mailbox (errflg=2) in Unknown on line 0

>>> Also, that bug is over six years old. I have no idea if the bug still
>>> exists or not. However, I do not consider a bug that old to still be
>>> valid until proven so.
>>
>> The issue's state was changed to "not a bug" in 2006 already. I
>> consider this to be correct, but not for the reason given in the
>> comments. IMO the valid reason to see it as "not a bug" is, that it's
>> not documented that imap_open() can be used for mbox *files*.
>>
>
> Correction - not a PHP bug. I have seen no reference to any bug being
> pursued in IMAP code.

As I said before, the reported bug[1] was set to "not a bug".

>> However, the issue does still exist, even with the latest c-client
>> library, which is from 2007.
>>
>
> And your proof that it exists in his copy of the code is?

Actually I was wrong. I tested with some recent PHP version (5.4.7),
and there the problem occured; but now I have checked the IMAP version
in use, and it is 2007e, despite the latest version is 2007f, for
whatever reason.

However, I made the following test script:

| $mbox = imap_open($_SERVER['DOCUMENT_ROOT'] . '/imap/mbox', '', '');
| var_dump($mbox);

On my local Windows XP machine with PHP 5.4.7 this prints:

| Warning: imap_open(): Couldn't open stream C:/xampp/htdocs
| /exp/imap/mbox in C:\xampp\htdocs\exp\imap\index.php on line 5
| boolean false
| Notice: Unknown: Can't open mailbox C:/xampp/htdocs/exp/imap/mbox:
| no such mailbox (errflg=2) in Unknown on line 0

On a Linux server with PHP 5.3.5 (IMAP version 2007e) it prints:

| resource(2) of type (imap)

Of course that is no proof, that imap_open() can't open an mbox file on
Windows, but it is some evidence at least.

> Unlike you, I'm not willing to jump to conclusions based on over six
> year old bug reports. I prefer to identify the problem. It may or may
> not be as you claim.

[1] <https://bugs.php.net/bug.php?id=39880>

--
Christoph M. Becker
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: why php echo does not show up in HTML?
Next Topic: Exhaustive memory allocation using arrays
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 10:52:04 GMT 2024

Total time taken to generate the page: 0.05159 seconds