Reputation: 2469
ErrorException (E_UNKNOWN) fgets(): SSL read operation timed out
156. * @return string
157. *
158. * @throws Swift_IoException
159. */
160. public function readLine($sequence)
161. {
162. if (isset($this->_out) && !feof($this->_out)) {
163. $line = fgets($this->_out);
164. if (strlen($line) == 0) {
165. $metas = stream_get_meta_data($this->_out);
This error refers to SendGrid. My Laravel settings are default:
laravel>app>config>mail.php
<?php
array(
'driver' => 'smtp',
'port' => 465,
'encryption' => 'ssl',
'sendmail' => '/usr/sbin/sendmail -bs',
)
How to solve it?
(see also: Laravel.io)
Upvotes: 1
Views: 1659
Reputation: 2469
I have found a solution but it is not the best way. For testing it is ok:)
When I uploaded my application to the cloud, I get the error.
On the domain, I have turned off the SSL. In laravel>app>config>mail.php
, I have changed this:
<?php
array(
'driver' => 'smtp',
'port' => 25, //earlier: 465
'encryption' => '', //earlier: 'ssl'
//other settings
)
Probably it's this bug in PHP 5.4.33 / 5.5.17 (link). You have to downgrade to version 5.4.32. Then it should work.
yum downgrade $(rpm -qa --qf "%{NAME}\n" | grep ^php | awk '{print $1"-5.4.32"}') -y
See also laravel.io.
Solution 3 is really simple, turn off all SSL on the domain.
Upvotes: 1
Reputation: 2799
Now that an update is available, another solution would be to upgrade PHP to v5.5.18:
sudo apt-get update
sudo apt-get dist-upgrade
Hope this helps.
Upvotes: 0