PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 11, 2022

[FIXED] Facebook SDK for PHP error - CurlException: 35: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

 February 11, 2022     curl, facebook-graph-api, facebook-php-sdk, php, ssl     No comments   

Issue

My app using Facebook SDK for PHP v2.0 stopped working since the past 20 - 24 hours. I keep getting the following error from the base_facebook.php -

CurlException: 35: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

From reading the other threads on stackoverflow I added the following lines of code to base_facebook.php but none of these help.

$opts[CURLOPT_SSL_VERIFYPEER] = false;
$opts[CURLOPT_SSL_VERIFYHOST] = false;
$opts[CURLOPT_SSLVERSION] = 3;
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');

Any suggestions to the fix the issue would be highly appreciated. Thanks.


Solution

It's because SSLv3 vulnerbility here: https://access.redhat.com/articles/1232123 Facebook disabled SSLv3 so, you cannot use it anymore.

If you have php 5.5 or 5.6, try change

$opts[CURLOPT_SSLVERSION] = 3;

to

$opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1;

If you can use it without constant error, it's ok. If you have php version lower than 5.5, just comment these 2 lines out and it will be fine after that.

$opts[CURLOPT_SSLVERSION] = 3;
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');


Answered By - Paiboon Panusbordee
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing