immobiliare / ApnsPHP

ApnsPHP: Apple Push Notification & Feedback Provider
BSD 3-Clause "New" or "Revised" License
1.44k stars 452 forks source link

fread hangs when read error message from server #94

Closed fengchang closed 9 years ago

fengchang commented 9 years ago

I'm using ApnsPHP from php-cli. It works well on my develop machine, but when executing same code on production machine. It will stop at

$sErrorResponse = @fread($this->_hSocket, self::ERROR_RESPONSE_SIZE);(Push.php:295)

It will never stop, even thought I have set $_nConnectTimeout manually.

The php version of my production environment is PHP 5.5.24-1+deb.sury.org~precise+1 (cli) (built: May 2 2015 09:50:58)

Have you ever meet this problem?

jbaez commented 9 years ago

I had that problem as well, it seems to be a bug with PHP. Now I'm running version 5.5.25 without any problems.

jbaez commented 9 years ago

90

fengchang commented 9 years ago

@jbaez Thank you very much.