简体   繁体   English

无法在 Windows 上的 Xampp 中安装 OAuth 扩展

[英]Cannot install OAuth extension in Xampp on Windows

I need to install oauth extension in php.我需要在 php 中安装 oauth 扩展。 I tried lot of ways but still I cannot get the oauth in my php.我尝试了很多方法,但仍然无法在我的 php.ini 文件中获得 oauth。 I mentioned below few steps to get oauth in PHP.我在下面提到了在 PHP 中获取 oauth 的几个步骤。

  1. I copied the php_oauth.dll file to xampp/ext/我将 php_oauth.dll 文件复制到 xampp/ext/

  2. wrote this line extension=php_oauth.dll in php.ini在 php.ini 中写了这行extension=php_oauth.dll

  3. After restarting the server I accessed the phpinfo().php重新启动服务器后,我访问了 phpinfo().php

But OAuth is not shown.但是没有显示 OAuth。

I can see this in my logfile:我可以在我的日志文件中看到这一点:

PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_oauth.dll' - %1 is not a valid Win32 application. in Unknown on line 0

I found a solution for this error.我找到了解决此错误的方法。 My system is 64 bit OS but XAMPP server installed in 32 bit.我的系统是 64 位操作系统,但 XAMPP 服务器安装在 32 位。 I install 64 bit oauth.dll file I cannot get oauth in PHP.我安装了 64 位 oauth.dll 文件我无法在 PHP 中获得 oauth。 After I install 32 bit oauth.dll I get the oauth in PHP file.(The windows binary and extension arch need to match)在我安装 32 位 oauth.dll 后,我在 PHP 文件中得到了 oauth。(windows 二进制文件和扩展 arch 需要匹配)

Download link to php_oauth.dll - https://pecl.php.net/package/oauth/1.2.3/windows php_oauth.dll 的下载链接 - https://pecl.php.net/package/oauth/1.2.3/windows

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM