Fatal error: Class 'Hybrid_Logger' not found in /hybridauth/Hybrid/Endpoint.php on line 165

情到浓时终转凉″ 提交于 2019-12-06 13:17:11

Before doing anything else, make sure you are using session_start().

Since using session_start() will throw an error of level E_NOTICE if a session has already been started, a better approach would be:

if(session_id() == '') {
    session_start();
}

And keep in mind that if the user's browser does not have cookies enabled, you will have issues with HybridAuth because of the default value of the PHP setting session.use_cookies

session.use_cookies = 1 //PHP uses cookies by default

A beta user for a project I'm working on reported seeing this error - and for a long time I was unable to replicate the error. After long hours of debugging, it turned out to be a browser configuration error that was specific to the user (cookies were disabled). Not sure if it will solve your problem, but it's worth mentioning that the error:

Fatal error: Class 'Hybrid_Logger' not found in hybridauth/Hybrid/Endpoint.php 

Can also be caused due to browser-specific settings (such as disabled cookies).

References:

http://php.net/manual/en/function.session-start.php

http://php.net/manual/en/session.security.php

This error occur if you cannot access the config.php or if the base_url is wrong or if you are trying to access the remote application service ( facebook , or else ) from localhost... You should then use a live domaine working online , to do so you have to add the following line to your windows/system32/drivers/etc/hosts if you are under windows and /etc/hosts if you are in unix based system :

127.0.0.1 your-domaine.extension

where extension is one of the following : com , net or anything else that could work

this method is applied if you have not a working domain for your application otherwise you need to specify your www domain for this to work properly...

hope its helpfull

josue.0

I had the exact same error, I discovered that the session global variable didn't have the required values ("CONFIG") and it was because I set the base_url to a different than the one from which I was testing. To be more specific: I was accessing with www.mywebsite.com and the base_url was set to just mywebsite.com. Fixed it by setting base_url to www.mywebsite.com. I also recommend to redirect to www like this: .htaccess - how to force "www." in a generic way?

require_once( "hybridauth-2.1.2/hybridauth/Hybrid/Auth.php" );

does not contain the full path like the include of config.php does.

Use session_start(); before any other things you do..

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!