Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.2

Bug #18281 Socket.php errors when sending large emails through Pear Mail
Submitted: 2011-02-17 01:06 UTC
From: lisa_riggle Assigned: doconnor
Status: Closed Package: Net_Socket (version 1.0.10)
PHP Version: 5.3.5 OS: Linux Fedora 14
Roadmaps: (Not assigned)    
Subscription  


 [2011-02-17 01:06 UTC] lisa_riggle (Lisa Riggle)
Description: ------------ When sending emails with a large amount of data through Pear Mail, I will receive a couple of errors like this: PHP Notice: fwrite() [function.fwrite]: send of 5 bytes failed with errno=11 Resource temporarily unavailable in /usr/local/lib/php/Net/Socket.php on line 384 followed by the send function erroring out with this message: Failed to send data [SMTP: Invalid response code received from server (code: 451, response: Timeout waiting for client input)] Actual results listed below include the PHP Strict messages I get when sending as well. Test script: --------------- Script located here. Copy/paste into a php file and change change the SMTP/To/From settings to match whatever you use. http://images.julisana.com/ellie/test_script.php Expected result: ---------------- I expect the mail to send without errors. Actual result: -------------- PHP Strict Standards: Non-static method Mail::factory() should not be called statically in /home/lisa/workspace/linkup/cron/maintenance/checkJobZip.php on line 138 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/lisa/workspace/linkup/pearMail/smtp.php on line 365 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 409 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 420 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 424 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 431 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 474 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 478 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/lisa/workspace/linkup/pearMail/smtp.php on line 376 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 583 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 727 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 731 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 739 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 743 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 747 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 752 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 617 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/lisa/workspace/linkup/pearMail/smtp.php on line 249 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/lisa/workspace/linkup/pearMail/smtp.php on line 285 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 870 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 873 PHP Strict Standards: Non-static method Mail_RFC822::parseAddressList() should not be called statically, assuming $this from incompatible context in /home/lisa/workspace/linkup/pearMail/Mail.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 900 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 903 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 981 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 984 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 1035 PHP Notice: fwrite() [function.fwrite]: send of 38 bytes failed with errno=11 Resource temporarily unavailable in /usr/local/lib/php/Net/Socket.php on line 384 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 1045 PHP Notice: fwrite() [function.fwrite]: send of 5 bytes failed with errno=11 Resource temporarily unavailable in /usr/local/lib/php/Net/Socket.php on line 384 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 1050 PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 358 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 1184 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 1187 PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 358 PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /home/lisa/workspace/linkup/pearMail/smtp.php on line 321 Message Send Result: Failed to send data [SMTP: Invalid response code received from server (code: 451, response: Timeout waiting for client input)] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 448 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 253 PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 451 PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/local/lib/php/Net/SMTP.php on line 358

Comments

 [2011-03-16 14:13 UTC] avinashl (Avinash Lalkota)
I am also facing same error when sending 8kb of attachment. Can anyone help me out.
 [2011-04-15 02:14 UTC] blueyed (Daniel Hahler)
The problem is likely that a timeout of 0 is being set accidentally (this gets done by Net_SMTP for example, see bug #18335). I've attached a patch which handles timeouts in write(), so that you should now get an error instead. It's another issue that setting a timeout of "0" should rather set it to "unlimited" then "0", but that's not what this patch is addressing (and there might be use cases for 0 maybe?!).
 [2011-04-15 13:56 UTC] alec (Aleksander Machniak)
 [2011-04-15 13:57 UTC] alec (Aleksander Machniak)
See also my timeout.patch and my commentsin https://pear.php.net/bugs/bug.php?id=18335
 [2012-01-25 18:24 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Applied both patches. Alec, on yours, there are extra changes for Net/SMTP - these are not applied. Can you raise a seperate defect on that package/apply tyhe changes there?