I am using PEAR's Services_Facebook-0.2.14
SDK, and the first of the following lines in Facebook.php
fails:
require_once 'Common.php';
require_once 'Services/Facebook/Common.php';
require_once 'Services/Facebook/Exception.php';
with the log message:
[21-Sep-2016 13:41:46 UTC] PHP Fatal error: require_once(): Failed opening required 'Common.php' (include_path='/home/thehanfw/php/Services') in /home/thehanfw/php/Services/Facebook.php on line 23
In my Facebook API client, I use the following lines to access the SDK:
ini_set("include_path", "/home/thehanfw/php/Services");
require_once "Facebook.php";
I have set the include path explicitly like this out of desperation, before my app would even find Facebook.php
. The Common.php
file is present, and I have commented out the require_once 'Services/Facebook/Common.php';
because Services
is already the include directory, and I was getting exactly the same error with the original code.
Interesting as well is that this error is logged about 20 times in very quick succession before I get an HTTP ERR_TOO_MANY_REDIRECTS
error in my client app. This is on a shared host, with PHP 5.6.22.
BREAKING: I found it funny that my client app was working fine on my dev machine though, but then I realised I had only later installed the blasted PEAR on my PC, and the app was working against an SDK directly downloaded from Facebook, named php-graph-sdk-5.0.0
. I don't know if the 5.0.0
FB version vs. the 0.2.14
PEAR version, but that I've cleaned out the PEAR crap from my host, and installed the FB SDK, it works on the host as well.