On Fri, 9 May 2008, Dave Fischetti wrote:

> On May 9, 2008, at 5:45 AM, Alexandru Stanoi wrote:
> 
> > It seems that there is a bug in the getLine() function in  
> > ezcMailTransportConnection(Mail/src/transports/ 
> > transport_connection.php), which causes the uncaught exception  
> > above. getLine() tries to read in blocks of 512 from the server  
> > until it encounters CRLF. But in the function, if the CRLF is split  
> > in 2 different blocks (for example trying to read 511 characters +  
> > CR + LF, which is 2 blocks of 512) then it will throw that exception.
> >
> > I opened an issue for this (http://issues.ez.no/13010), and it will  
> > be fixed soon for the 2008.1 (beta1) release of eZ Components.
> >
> > If you need the fix in your version (I see you are still using  
> > 2007.2.1) you can modify it yourself: in Mail/src/transports/ 
> > transport_connection.php, in the function getLine() on line 207 you  
> > have:

[snip code]
> >
> > Dave, can you please check if this helps?
> 
> Hey Alex, Unfortunately. I received the error again  after  
> implementing this change. I hadn't restarted apache afterwards, but I  
> don't think that would matter, right? I just restarted it now but I  
> have a feeling I'll see that happen again.
> 
> Here is the error I received:
> 
> <br />
> <b>Fatal error</b>:  Uncaught exception 'ezcMailTransportException'  
> with message 'An error occured while sending or receiving mail. Could  
> not read from the stream. It was probably terminated by the host.' in / 
> usr/include/php/ezcomponents-2007.2.1/Mail/src/transports/ 
> transport_connection.php:217
> Stack trace:
> #0 /usr/include/php/ezcomponents-2007.2.1/Mail/src/transports/pop3/ 
> pop3_transport.php(365): ezcMailTransportConnection-&gt;getLine()
> #1 /var/www/vhosts/mydomain.com/httpdocs/parserScript.php5(50):  
> ezcMailPop3Transport-&gt;authenticate('[EMAIL PROTECTED]', 'mypassword')
> #2 {main}
>   thrown in <b>/usr/include/php/ezcomponents-2007.2.1/Mail/src/ 
> transports/transport_connection.php</b> on line <b>217</b><br />
> 
> Any other suggestions? Thanks again

What you could try to do is to make an Xdebug trace that allows to log 
*all* function calls including variables. For this to do you have to 
install Xdebug (http://xdebug.org). After you've installed it, you need 
to make a couple of settings in preferrably an .htaccess file:

php_value xdebug.auto_trace 1
php_value xdebug.collect_params 3
php_value xdebug.collect_return 1
php_value xdebug.trace_output_name "trace.%r"
php_value xdebug.trace_output_dir "/tmp"

With this enabled it will create a lot of data. Once it happend again, 
grep the trace files for the term 'ezcMailTransportException' and send 
me the tracefile (zipped or gzipped) please. With this we can see what 
wrong wrong hopefully.

If you can reproduce this with the CLI as well, please let me know.

regards,
Derick
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to