In my app, CURL was timing out and thus resulting the error:
CurlException: 28: Connection time-out
So, I increased the CURLOPT_CONNECTTIMEOUT value in base_facebook.php from 10 to 30. After that, the Connection time-out error just vanished but came the new one:
Cannot send session cache limiter - headers already sent
The line it indicates the error is at 49 in facebook.php file where the code session_start(); is there.
When I changed the CURL timeout value back to 10 or 15, this session cache error goes off. But the timeout error is back!
I am using the latest PHP SDK (which was last updated two days ago).
The following is the present CURL options in base_facebook.php:
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
Any ideas/suggestions on how to clear this issue?
Make sure that your files are saved without the BOM encoding, especially the one which gives you the
headers already senterror.I’ve had this problem before – even though I was not outputting anything, there were extra characters in the file.