Home > Tech > WordPress spell check SSL error

WordPress spell check SSL error

I ran into a WordPress error with the built-in spell check.

Error response: <br />
<b>Warning</b>:
fgets() [<a href='function.fgets'>function.fgets</a>]: SSL:
fatal protocol error in
<b>/path/to/htdocs/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php</b>
on line <b>94</b><br />
{"id":null,"result":

The error is described a bit here but they don’t really solve it.  It’s pretty unlikely that a host would be blocking outbound SSL connections over 443.

http://wordpress.org/support/topic/207781

This guy hits the nail on the head.

http://kennyocracy.com/2008/10/02/solution-to-tinymce-fatal-error-in-googlespell/

The issue is if you don’t have curl support in PHP.  I had compiled PHP without curl support (I have Gentoo.  Needed to add the ‘curl’ use flag.)  You can check to see if you have curl support installed by doing ‘php –phpinfo’ from the command line or using the phpinfo() function.

Categories: Tech Tags: ,
  1. March 31st, 2009 at 17:37 | #1

    If you change the HTTP version to 1.1 on line 62 of the GoogleSpell.php file, you’ll find that it works just fine with the fgets and you won’t need to have curl installed. So the line looks like:

    $header = “POST “.$path.” HTTP/1.1 \r\n”;

  2. March 31st, 2009 at 17:49 | #2

    Actually, now I’ve posted that I’m getting intermittent fgets issues still arising, but not the constant failure I had before changing the HTTP version… So maybe not a solution after all. (feel free to delete these comments! :-) )

  1. September 9th, 2009 at 14:27 | #1