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 #181738 is a reply to message #181731] Tue, 28 May 2013 22:08 Go to previous message
Christoph Becker is currently offline  Christoph Becker
Messages: 91
Registered: June 2012
Karma:
Member
Chuck Anderson wrote:
> Not quite yet. I might get this.

I was able to build the IMAP extension under Cygwin. I exported some
news with the Thunderbird Add-On ImportExportTools to a file in mbox
format and copied that to my home directory.

$ php -r '$imap=imap_open("test.mbox", "",
"");var_dump(imap_check($imap));'
object(stdClass)#1 (5) {
["Date"]=>
string(31) "Tue, 28 May 2013 23:53:42 +0200"
["Driver"]=>
string(4) "unix"
["Mailbox"]=>
string(19) "/home/cmb/test.mbox"
["Nmsgs"]=>
int(11)
["Recent"]=>
int(0)
}

The driver is reported as "unix"! In PHP 5.4.15 in ext/imap/php_imap.c
line 839[1] this driver is linked in only, if the system is not Win32
(PHP_WIN32).

imap_open()ing an Inbox of Thunderbird directly reports the "dummy"
driver and 0 messages (same as for an empty file).

So the solution to be able to read Thunderbird mailboxes under Windows
might to be to export them to a format that is handled by the "mbx"
driver. I do not know, how this can be accomplished.

[1] <http://lxr.php.net/xref/PHP_5_4/ext/imap/php_imap.c#839>

--
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: Mon Feb 17 16:56:54 GMT 2025

Total time taken to generate the page: 0.09084 seconds