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 #181725 is a reply to message #181723] Mon, 27 May 2013 23:42 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 12:08 PM, Christoph Becker wrote:
>> 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
>> '
>
> And none of the purported statements he tried line up with the purported
> results he posted. However, I guess that's a bit beyond your level of
> comprehension.

Indeed, the paths don't line up--thank you for making me aware of it, as
I have not checked that in the first place. However, let's concentrate
on my own test below.

>>>> > 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".
>>
>
> Again, your comprehension is lacking. It was set as not a PHP bug.
> However, once again, there is no indication this is the same problem as
> a reported bug over six years old.
>
>>>> 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.
>>
>
> No! You, wrong? Can't be!

Of course that can be. I am human, and humans make mistakes sometimes.
And of course, I'm able to admit, when I have done so.

>> 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
>>
>
> Not having any idea how your system is set up, I would say your test is
> worthless.

Which information do you require? It's hard for me to recognize all
*necessary* information.

However, you might consider to run the test yourself on a system of your
choice.

>> On a Linux server with PHP 5.3.5 (IMAP version 2007e) it prints:
>>
>> | resource(2) of type (imap)
>>
>
> See above.
>
>> 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>
>>
>
> 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.

I also prefer to identify the problem; unfortunately my limited
knowledge and time make that hard to accomplish. If you like, you may
help out.

--
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: Thu Nov 28 00:55:02 GMT 2024

Total time taken to generate the page: 0.05172 seconds