开发者

PHP not loading curl module

开发者 https://www.devze.com 2023-03-17 02:09 出处:网络
PHP is not loading curl module in FreeBSD. I had compiled PHP with curl shared library & the php binary is linked to /usr/lib/libcurl.so.1 when checked with ldd.

PHP is not loading curl module in FreeBSD. I had compiled PHP with curl shared library & the php binary is linked to /usr/lib/libcurl.so.1 when checked with ldd.

When I try to use any of the curl api like curl_init(), PHP throws an fatal error unknown function. Not sure what is the problem. Every thing seems to be fine. I even trie开发者_JAVA百科d adding extensions = /usr/lib/libcurl.so in my php.ini file but no luck till now. Any suggestions.


Compiling PHP with curl shared library just means you've enabled the ability for PHP to use curl, it doesn't enable it.

You still need to add:

extension=curl.so

Obviously, make sure you're using the right php.ini file based on whether you're using the command line (cli) or apache/web server php environment.

http://www.php.net/manual/en/curl.setup.php

Most linux distributions have a package to handle adding curl to php.

0

精彩评论

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