PHP不能在Windows 7 64位加载卷曲 [英] php can't load CURL in Windows 7 64-bit

查看:332
本文介绍了PHP不能在Windows 7 64位加载卷曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我尝试每一个解决方案,我可以在网上找到,没有什么似乎是工作。我试图让我的第一个Facebook应用程序离开地面。我运行Apache 2.4。我手动安装了PHP 5.4.11到C:\\ PHP。我更新了C:\\ PHP \\ php.ini中改变的extension_dir到

So I've tried every solution I can find online and nothing seems to be working. I'm trying to get my first Facebook app off the ground. I'm running Apache 2.4. I installed PHP 5.4.11 manually to C:\php. I updated C:\php\php.ini changing the extension_dir to

extension_dir = "c:\php\ext"

和前面去除分号

extension=php_curl.dll

我还添加了的libeay32.dll ssleay32.dll 到C:\\ Windows中,C:\\ Windows \\ System32下,C:\\ PHP,C:\\ PHP \\分机,C:\\ Apache24,和C:\\ Apache24 \\ bin中。所有这些目录都在PATH。当我运行phpinfo()函数,袅袅未列出那里。我停了下来,所有的更改后重新启动Apache的。没有运气。我仍然得到错误。

I've also added libeay32.dll and ssleay32.dll to C:\Windows, C:\Windows\System32, C:\php, C:\php\ext, C:\Apache24, and C:\Apache24\bin. All of these directories are in PATH. When I run phpinfo(), CURL is not listed there at all. I've stopped and restarted Apache after all the changes. No luck. I still get the error

Fatal error:
Uncaught exception 'Exception' with message 
'Facebook needs the CURL PHP extension.' in C:\Users\...\sdk\src\base_facebook.php:19 
Stack trace: 
#0 C:\Users\...\sdk\src\facebook.php(18): require_once() 
#1 C:\Users\...\index.php(46): require_once('C:\Users\Jew\Do...') 
#2 {main} thrown in C:\Users\...\sdk\src\base_facebook.php on line 19

编辑#1:结果
另外,我没有使用WAMP服务器。

EDIT #1:
Also, I'm not using WAMP server.

编辑#2:结果
我加了mod_ssl到的httpd.conf 是这样的:
    
      的LoadModule ssl_module模块/ mod_ssl.so
    

EDIT #2:
I added mod_ssl to httpd.conf like this: LoadModule ssl_module modules/mod_ssl.so

现在的phpinfo()显示

SSL:支持

OpenSSL的支持:禁用(安装分机/ OpenSSL的)

编辑#3:
我刚刚发现了以下错误在我的Apache error.log中

PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\php\\ext\\php_curl.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'c:\\php\\ext\\php_openssl.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0

编辑#4:
我已经使用了mod_ssl尝试过,但因为它加载卷曲Apache日志给出了同样的错误。我已经采取了所有的东西退了出去。

Edit #4: I've tried using mod_ssl, but the apache log gives the same error as it does for loading curl. I've taken all that stuff back out.

我也同时使用5.4.13版本 php_curl.dll 的从anindya.com/php-5-4-3-and-php-尝试13年5月3日 - x64-64位换窗户,以及与PHP 5.4.11线程安全版本附带的原件。

I've also tried using both of the 5.4.13 versions of php_curl.dll from anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows as well as the original that came with PHP 5.4.11 Thread Safe version.

推荐答案

要总结(如果我没有错过任何细节)你有这样的:

To sum up (if I didn't miss any detail) you have this:


  • PHP版本5.4.11,32位

  • php_curl.dll版本号为5.4.13,64位

这是行不通的。假设你有一个64位的机器,我建议你也使用来自anindya.com的PHP版本,因此PHP和卷曲的比赛。在这样的网站,你还可以找到64位的Apache版本。

That cannot work. Given that you have a 64 bit machine, I suggest you also use the PHP version from anindya.com so PHP and curl match. At such site you can also find 64 bit Apache releases.

另外,使用一切的32位版本。

Alternatively, use 32 bit releases of everything.

这篇关于PHP不能在Windows 7 64位加载卷曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆