开发者

Cannot get cURL support enabled in PHP on Linux

开发者 https://www.devze.com 2023-02-17 06:09 出处:网络
cURL does not appear in phpinfo() and fails inside of PHP scripts even after ensuring the following: curl.so does exist in /usr/lib/php/modules/curl.so along with my other successfully working PHP m

cURL does not appear in phpinfo() and fails inside of PHP scripts even after ensuring the following:

  • curl.so does exist in /usr/lib/php/modules/curl.so along with my other successfully working PHP modules.

  • /usr/lib/php/modules/curl.so is the only place where curl.so is to be found on the system.

  • extension=curl.so is uncommented in php.ini

  • /etc/php/php.ini is the only place where php.ini is to be found on the system.

  • I restarted my webserver several times.

  • The phpinfo Configure Command shows: '--with-curl=shared'

However, the big blue block that shows "curl" settings (as typically found in phpinfo on other systems) is not appearing. Furthermore, function_e开发者_Go百科xists('curl_init') returns false inside of PHP.

I must be missing something... But what?

Your help is greatly appreciated!


dl("curl.so");

Try this eventually even with the complete path to the library. And also check if this works on the commandline. If the .so should be incompatible to your PHP interpreter (or be otherwise corrupt), then you will not see any messages in the output from a phpinfo script. PHP fails otherwise silently if it was referenced from the php.ini. Any issues would only turn up on the console or in the Apache error log.

0

精彩评论

暂无评论...
验证码 换一张
取 消