- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在准备将 HyBridAuth 作为插件部署在我的网站中。我的功能看起来像这样。
function authenticatewith( $provider ){
ini_set('display_errors','on');
//includes
$config = dirname(__FILE__) . '/hybridauth-2.1.2/hybridauth/config.php';
require_once( "hybridauth-2.1.2/hybridauth/Hybrid/Auth.php" );
$provider_name = $provider;
//$config = $this->getconfig($id);
try{
// initialize Hybrid_Auth with a given file
$hybridauth = new Hybrid_Auth( $config );
// try to authenticate with the selected provider
$adapter = $hybridauth->authenticate( $provider_name );
// then grab the user profile
$user_profile = $adapter->getUserProfile();
}
catch( Exception $e ){
echo "Error: please try again!";
echo "Original error message: " . $e->getMessage();
}
echo "USer Details: ";
var_dump($user_profile);
}
当我尝试访问任何提供程序时遇到 fatal error 。
Fatal error: Class 'Hybrid_Logger' not found in hybridauth/Hybrid/Endpoint.php on line 165
我在堆栈中没有得到这个问题的链接,但我会在这里提出这个问题。
感谢和问候
最佳答案
在执行其他操作之前,请确保您正在使用 session_start()。
由于如果 session 已经启动,使用 session_start() 会抛出 E_NOTICE 级别的错误,因此更好的方法是:
if(session_id() == '') {
session_start();
}
请记住,如果用户的浏览器未启用 cookie,则由于 PHP 设置 session.use_cookies 的默认值,您将遇到 HybridAuth 问题
session.use_cookies = 1 //PHP uses cookies by default
我正在开发的一个项目的测试版用户报告说看到了这个错误 - 并且很长一段时间我无法复制这个错误。经过长时间的调试,结果发现这是一个特定于用户的浏览器配置错误(cookie 被禁用)。不确定它是否能解决您的问题,但值得一提的是错误:
Fatal error: Class 'Hybrid_Logger' not found in hybridauth/Hybrid/Endpoint.php
也可能是由于浏览器特定设置(例如禁用 cookie)引起的。
引用文献:
关于php - fatal error : Class 'Hybrid_Logger' not found in/hybridauth/Hybrid/Endpoint. php 第 165 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26795216/
我最近不得不选择一个 Linux 发行版来从网站上下载。我面临三个选择; bt-hybrid 版本、iso-hybrid 版本和 webboot 版本。有什么区别? 最佳答案 bt - 仅用于下载 .
PWA 和混合应用之间有什么区别?之前有人问过这个问题,但我还没有找到合适的答案。 我知道 PWA 在浏览器中运行,您可以从应用商店获得混合应用。 但两者都使用带有 HTML 和 CSS 的 Java
PWA 和混合应用之间有什么区别?之前有人问过这个问题,但我还没有找到合适的答案。 我知道 PWA 在浏览器中运行,您可以从应用商店获得混合应用。 但两者都使用带有 HTML 和 CSS 的 Java
Hybrid App 是混合模式应用的简称,兼具 Native App 和 Web App 两种模式应用的优势,开发成本低,拥有 Web 技术跨平台特性。目前大家所知道的基于中间件的移动开发框架都是
我正在使用将Cordova用于Galaxy Tab E的混合android应用程序。 一切都可以在我的计算机浏览器上正常运行,除了音频文件外,其他选项卡上的功能均相同,但是声音不起作用。 我试过了 -
Closed. This question is off-topic。它当前不接受答案。
我正在使用 Xamarin Forms 构建一个应用程序,在此我实现了一个混合 webview。在 IOS 中,混合 Web View 具有缩放功能,我需要将其禁用。 这是我到目前为止尝试过的:-
我们必须将遗留的 POI 数据库从 MySQL 重新设计为 PostgreSQL。目前,所有实体都有 80-120 多个代表各个属性的属性。 我们被要求考虑新数据库的灵 active 和良好的设计方法
我决定学习如何在 Windows 上创建 Android APK 供个人/学习使用(不适用于 Android Play)。 我的设计计划是在 Android 应用程序上加载远程 HTML 页面,并允许
您能否推荐一个结构良好的 Python 模块,该模块结合了编译的 C 代码(例如使用 distutils)和解释的源代码?我认为“包”可以汇总解释模块和编译模块,但是如果可以将编译源和解释源合并到一个
对于我的网站,我需要有一种方法让用户输入他们的城市。 我想为此使用 2 个下拉列表:“州”和“城市”下拉列表。 “城市”列表中的选项取决于选择的“州”。 但是,必然会出现用户的“城市”不在下拉列表中的
我正在尝试将 AngularJS 1.6 应用程序与 Angular 5 一起转换为混合应用程序。我定义了以下简单过滤器: (function () { "use strict"; v
有没有一种方法可以点击默认的兴趣点并使用 MapKit 显示其弹出窗口? 如果您点击 POI 图标,我附上了它在 Apple Map App 上如何工作的屏幕截图。 如果您尝试在自己的应用程序上使用相
上下文:我正在使用 Cordova 6 和 SAPUI5 框架开发混合应用程序(目前只需要担心 Android)。 我想要的:快速将文件复制/移动到路径。也许得到 FileEntry来自 FileUp
我正在开始一个新的 WPF/Silverlight 自定义控件项目,并想对此进行单元测试。但是我对如何处理这个问题有点困惑。 此控件将基于 WPF 和 Silverlight 的相同代码库,并使用 #
我想在我的 Ionic 混合应用程序的通知栏中显示下载进度。like native app .我正在使用 cordova file transfer下载文件的插件。 Ionic 应用程序可以这样做吗?
我在移动设备上遇到点击问题,我正在英特尔 XDK 中进行调度,使用 cordova 作为程序来理解应用程序中的 native 命令。 当我单击某些输入或重新定向任何页面时,就会出现问题。为了执行上面提
是否可以通过 API(.NET 或 REST)创建应用服务混合连接端点?看来只能通过门户网站才能实现。 我知道可以选择使用旧的 BizTalk 服务混合连接来执行此操作,但我需要使用此选项来实现新的
我使用 Appium 和 Java 来自动化移动应用程序的测试。很明显,当我想为 Android 编写测试时,我使用 AndroidDriver driver = [..]对于 iOS,我需要使用 I
我对 Salesforce 混合移动应用程序开发有点陌生。 我有一个运行良好的混合应用程序。 但是最近上传APK到play store时,play store报错 Your APK has been
我是一名优秀的程序员,十分优秀!