windows 无法加载 php_curl
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2662336/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Could not load php_curl
提问by Ruslan
I have installed php5.2.13, apache2.2.15 on WindowsXp.Add C:\php to PATH ssystem variable.
我已经在 WindowsXp 上安装了 php5.2.13、apache2.2.15。将 C:\php 添加到 PATH ssystem 变量。
I can't enable curl extension. I configure extension_dir and remove ";" form php_curl in php.ini but nothing!
我无法启用 curl 扩展。我配置 extension_dir 并删除“;” 在 php.ini 中形成 php_curl 但什么也没有!
I copied ssleay32.dll and libeay32.dll in system32 directory - nothing Error log say: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_curl.dll' - Attempt to access invalid address.\r\n in Unknown on line 0
我在 system32 目录中复制了 ssleay32.dll 和 libeay32.dll - 没有错误日志说:PHP 警告:PHP 启动:无法加载动态库 'C:\php\ext\php_curl.dll' - 尝试访问无效地址。\r \n 在第 0 行未知
Can someone help me?
有人能帮我吗?
Thanks and sorry for bad english.
感谢并抱歉英语不好。
回答by Ruslan
I found a solution : mod_ssl was disabled in http.conf.
我找到了一个解决方案:在 http.conf 中禁用了 mod_ssl。
I remove dll files from system32 directory and everything is ok.
我从 system32 目录中删除了 dll 文件,一切正常。
So, just need to enable curl extension in php.ini. And enable mod_ssl in httpd.conf
所以,只需要在 php.ini 中启用 curl 扩展即可。并在 httpd.conf 中启用 mod_ssl
回答by MaximeBernard
As weird as it may seem, just enabling mod_ssl extension in httpd.conf
看起来很奇怪,只需在 httpd.conf 中启用 mod_ssl 扩展
LoadModule ssl_module C:\YOUR\PATH\apache-2.2\modules\mod_ssl.so
resolved my problem.
解决了我的问题。
回答by tivnet
I had this error after upgrading from PHP 7.2 to 7.3.
从 PHP 7.2 升级到 7.3 后出现此错误。
The solution was to download a new version of Apache from https://www.apachelounge.com/download/. The new Apache/bin had libcurl.dll.
解决方案是从https://www.apachelounge.com/download/下载新版本的 Apache 。新的 Apache/bin 有 libcurl.dll。