I have moved a code repository using HybridAuth from a server to different one. I configured all the login provider apps like Facebook/Twitter but after moving the code, none of the login seems to be working.
This is what login.php in HybridAuth looks like:
$config = 'library/hybridauth/config.php';
require_once("library/hybridauth/Hybrid/Auth.php");
These files have a relative path from the Root directory as: library/hybridauth/config.php
Infact, i access install.php like this : {domainName}/library/hybridauth/install.php
I var_dump-ed the following line:
// create an instance for Hybridauth with the configuration file path as parameter
$hybridauth = new Hybrid_Auth( $config );
var_dump($hybridauth);
and it is giving me an empty hybridauth object.
object(Hybrid_Auth)#1 (0) {
}
Server logs are not helping as well.. Any suggestions ?
Debug Logs:
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Auth::initialize()
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::initialize(). PHP version: 5.4.31
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::initialize(). Hybrid_Auth version: 2.1.2
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::initialize(). Hybrid_Auth called from: http://<DOMAIN_NAME>/login.php?provider=Facebook
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize. dump used config: -- a:8:{s:8:"base_url";s:33:"http://<DOMAIN_NAME>/library/hybridauth/";s:9:"providers";a:10:{s:6:"OpenID";a:1:{s:7:"enabled";b:1;}s:3:"AOL";a:1:{s:7:"enabled";b:1;}s:5:"Yahoo";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:0:"";s:6:"secret";s:0:"";}}s:6:"Google";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:40:"<GOOGLE_APP_KEY>";s:6:"secret";s:24:"<GOOGLE_APP_SECRET>";}}s:8:"Facebook";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:16:"<FB_APP_KEY>";s:6:"secret";s:32:"<FB_APP_SECRET>";}}s:7:"Twitter";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:3:"key";s:25:"<TWTR_APP_KEY>";s:6:"secret";s:50:"<TWTR_APP_SECRET>";}}s:4:"Live";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:0:"";s:6:"secret";s:0:"";}}s:7:"MySpace";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:3:"key";s:0:"";s:6:"secret";s:0:"";}}s:8:"LinkedIn";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:3:"key";s:14:"<LINKEDIN_APP_KEY>";s:6:"secret";s:16:"<LINKEDIN_APP_SECRET>";}}s:10:"Foursquare";a:2:{s:7:"enabled";b:1;s:4:"keys";a:2:{s:2:"id";s:0:"";s:6:"secret";s:0:"";}}}s:10:"debug_mode";s:2:"no";s:10:"debug_file";s:40:"library/hybridauth/debug_file/debug_file";s:9:"path_base";s:61:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/";s:14:"path_libraries";s:72:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/thirdparty/";s:14:"path_resources";s:71:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/resources/";s:14:"path_providers";s:71:"/home/breakit14/public_html/<DOMAIN_NAME>/library/hybridauth/Hybrid/Providers/";}
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize. dump current session: -- a:3:{s:37:"hauth_session.twitter.hauth_return_to";s:48:"s:40:"http://<DOMAIN_NAME>/login.php?provider=Twitter";";s:36:"hauth_session.twitter.hauth_endpoint";s:60:"s:52:"http://<DOMAIN_NAME>/library/hybridauth/?hauth.done=Twitter";";s:40:"hauth_session.twitter.id_provider_params";s:347:"a:5:{s:15:"hauth_return_to";s:40:"http://<DOMAIN_NAME>/login.php?provider=Twitter";s:11:"hauth_token";s:32:"8c8d4234e6dd0baadbf3ffc7a65b771f";s:10:"hauth_time";i:1408439081;s:11:"login_start";s:75:"http://<DOMAIN_NAME>/library/hybridauth/?hauth.start=Twitter&hauth.time=1408439081";s:10:"login_done";s:52:"http://<DOMAIN_NAME>/library/hybridauth/?hauth.done=Twitter";}";}
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize: check if any error is stored on the endpoint...
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth initialize: no error found. initialization succeed.
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Auth::authenticate( Facebook )
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::authenticate( Facebook ), User not connected to the provider. Try to authenticate..
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Auth::setup( Facebook ) --
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::setup( Facebook ), no params given. Trying to get the sotred for this provider. --
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::setup( Facebook ), no stored params found for this provider. Initialize a new one for new session
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Auth::setup( Facebook ). HybridAuth Callback URL set to: -- http://<DOMAIN_NAME>/login.php?provider=Facebook
INFO -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Enter Hybrid_Provider_Adapter::factory( Facebook )
DEBUG -- <CURRENT_IP_ADDRESS> -- 2014-08-19T17:52:51+00:00 -- Hybrid_Provider_Model::__construct( Facebook ) initialized. dump current adapter instance:
I would fire up something like Telerik's Fiddler to examine exactly what is going over the wire, as the debugging log is one removed from what you are actually sending and receiving. At least then you could find out whether Facebook was contacted or not by your PHP code.