Re: [PHP] imap_header timing out
> Is error_reporting in your php.ini set to "E_ALL & ~E_NOTICE" ? > It's the default: error_reporting = E_ALL -- /* All outgoing email scanned by AVG Antivirus /* Amer Neely, Softouch Information Services W: www.softouch.on.ca E: [EMAIL PROTECTED] V: 519.438.5887 Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_header timing out
> Put: > > set_time_limit(0); > > At the top of your script. Excellent! That worked, thank you. Now I'm getting .. [08-Jul-2003 12:32:46] PHP Notice: (null)(): Unexpected characters at end of address: <> (errflg=3) in Unknown on line 0 And the output is a blank html page, but the source code shows no messages are being grabbed! I haven't been able to find a reference to 'errflg=3' anywhere. I suspect there are some bad characters lying in wait in one of the headers. A perl script that reads the mailbox has no problems with any of the headers, but it uses external modules for some of the header parsing. I may have to do my own with PHP. -- /* All outgoing email scanned by AVG Antivirus /* Amer Neely, Softouch Information Services W: www.softouch.on.ca E: [EMAIL PROTECTED] V: 519.438.5887 Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imap_header timing out
I've a script reading a mailbox using $InBox = imap_open($Host,$User,$Pass); $NumMsgs=imap_num_msg($InBox); for ($i=1; $i <= $NumMsgs; $i++) { $Header=imap_header($InBox,$i); # this is line 154 . . . and so on. With 12 messages in the mailbox this works fine, but with 15 it comes back as timed out... [08-Jul-2003 12:32:46] PHP Fatal error: Maximum execution time of 30 seconds exceeded in g:\httpd\public\readmail\readmail.php on line 154 I'm running this at home (W2K/Apache/PHP 4.3.2) on a dialup account. Can someone shed some light on why it may be timing out, and where do I increase the timeout if needed? Or optimize the code if possible? -- /* All outgoing email scanned by AVG Antivirus /* Amer Neely, Softouch Information Services W: www.softouch.on.ca E: [EMAIL PROTECTED] Perl | PHP | MySQL | CGI programming for all data entry forms. "We make web sites work!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php