I deployed my D5 site from my dev machine (Arch Linux with PHP 5.2.9) to the test server (Debian Etch with PHP 5.2.0-8+etch13). One custom module submits an XML-RPC request to a remote server via HTTPS. On the test server I got this error message:
Warning: fread() [function.fread]: SSL: fatal protocol error in /.../includes/common.inc on line 482
After googling around I found this PHP bug: http://bugs.php.net/bug.php?id=41770
To make the site work I had to apply a patch on the core.
I don't know if this ticket can be qualified as a "Drupal bug" since this is a PHP bug, and it is very hard to reproduce, but if anyone suffers from this problem then the patch can be helpful.
Comments
Comment #1
BMDan commentedSurely throwing around "@"'s willy-nilly can't be well-advised.
Comment #2
Fogg commentedHi,
got the same issue here. Instead of using @ I increased the read-size.
This also solves the issue and seems to be more safe.
Fogg
Comment #3
drummThat PHP bug says it was fixed 2007-07-02. What version of PHP are you all running?
@Yorirou I see you have 5.2.9. Can you upgrade to at least 5.2.10?
Comment #4
tamasd commentedThe PHP on the server is upgraded (5.2.6-1+lenny9), and I changed my distro since then (now I have PHP 5.3.2).
I haven't seen any sign of this bug since a year or so... maybe it is fixed with the server upgrade, however I can't confirm, we don't have that site on the test server anymore.
Comment #5
Fogg commentedwell, I am on a centos 5.6 with PHP 5.1.6. may be that is the reason...
Comment #6
alexku commentedFogg, thank you very much. Increasing read size fixed an issue for me with fb module
D6 is also affected by this
Comment #7
tr commented#6 indicates that this is still an issue with Drupal 6.x, and since 5.x is no longer supported I'm going to bump this up to the 6.x-dev queue. I don't know how to reproduce the error, so I can't test to see if it's also present in Drupal 7.x or Drupal 8.x.
Comment #8
mandreato commentedI had the same problem (see #1340016: fread() SSL: fatal protocol error in common.inc on line 551) with Drupal 6.22 / Ubercart 6.x-2.x-dev running on the following environment:
Apache/2.2.3 (Debian) mod_jk/1.2.18 mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch16 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
Patch #2 worked for me too.