Login   Register  
PHP Classes
elePHPant
Icontem

ERROR with big data.HOW can i use the big data with DATA->

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      MIME E-mail message parser  >  All threads  >  ERROR with big data.HOW can i use the big data with DATA->  >  (Un) Subscribe thread alerts  
Subject:ERROR with big data.HOW can i use the big data with DATA->
Summary:HOW can i use the big data with parameters DATA->
Messages:3
Author:zuing
Date:2012-07-29 05:24:29
Update:2012-07-30 06:15:43
 

  1. ERROR with big data.HOW can i use the big data with DATA->   Reply   Report abuse  
Picture of zuing
zuing
2012-07-29 05:24:29
The DATA size is 80M.
Then i get error
"Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 6985180 bytes) in ...\mimeparser\mime_parser.php on line 1581"

i user the "'File'=>"md50000000023.msg" (the same email file 80M) and must
comment the top 3 line.($header,$body,$full),then it work.
how can i use the parameters ('Data'=>$full) .($full is big data)
the code almost like this:

$header=imap_fetchheader($mbox,$i);
$body=imap_body($mbox,$i);
$full=$header.$body;

$mime=new mime_parser_class;
$mime->mbox = 0;
$mime->decode_bodies = 1;
$mime->ignore_syntax_errors = 1;
$mime->track_lines = 1;
$mime->use_part_file_names = 1;
$parameters=array(
'Data'=>$full,
//'SaveBody'=>'',
'SkipBody'=>0,


  2. Re: ERROR with big data.HOW can i use the big data with DATA->   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2012-07-29 06:14:09 - In reply to message 1 from zuing
If you try to pull the whole message into a string, obviously it will exceed PHP memory limits. That is why the File input option exists, so it can process message data in small chunks.

If your message is available via POP3 server, you can pull it using the POP3 class, as it provides a stream wrapper while allows you to access messages as if they were files.

http://www.phpclasses.org/package/2-PHP-Access-to-e-mail-mai ...

If the message is available only via IMAP protocol, you need to access it with a component that retrieves messages in chunks, rather then whole messages at a time.

  3. Re: ERROR with big data.HOW can i use the big data with DATA->   Reply   Report abuse  
Picture of zuing
zuing
2012-07-30 06:15:43 - In reply to message 2 from Manuel Lemos
Thanks for your help!it works.