且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

致命错误:在第165行的/hybridauth/Hybrid/Endpoint.php中找不到类'Hybrid_Logger'

更新时间:2023-11-16 23:09:46

在执行其他任何操作之前,请确保您使用的是session_start().

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

由于如果已经启动了会话,则使用session_start()会引发E_NOTICE级错误,因此更好的方法是:

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();
}

请记住,如果用户的浏览器未启用Cookie,则由于PHP设置session的默认值,您将遇到HybridAuth问题.use_cookies

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

我正在处理的项目的Beta版用户报告看到此错误-很长时间以来,我无法复制该错误.经过长时间的调试,事实证明这是特定于用户的浏览器配置错误(cookie被禁用).不确定是否可以解决您的问题,但是值得一提的是该错误:

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 

也可能是由于浏览器特定的设置(例如禁用的Cookie)引起的.

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

参考:

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

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