Need to install php_curl.so on Cent OS 5.2

Support for webhosts that use CentOS
Post Reply
cabot
Posts: 2
Joined: 2008/11/11 17:07:38
Contact:

Need to install php_curl.so on Cent OS 5.2

Post by cabot » 2008/11/11 17:17:09

Hello,

I am trying to run a php script that uses php curl library but I get the following errors:

PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php/modules/php_curl.so' - /usr/lib/php/modules/php_curl.so: cannot open shared object file:

I tried to install php_curl via yum, but not sure which package it is in. yum search or google search did not yield any centos specific result.

How do I install or configure php to be curl enabled? Any help would be much appreciated.

Thank you,
Cabot

cabot
Posts: 2
Joined: 2008/11/11 17:07:38
Contact:

Re: Need to install php_curl.so on Cent OS 5.2

Post by cabot » 2008/11/11 18:27:03

Both curl and php-common packages are already installed.

rpm -qa php-common
php-common-5.1.6-20.el5_2.1


rpm -qa curl
curl-7.15.5-2.el5

mickh
Posts: 124
Joined: 2008/02/15 09:42:43
Location: Australia

Re: Need to install php_curl.so on Cent OS 5.2

Post by mickh » 2008/11/11 23:33:40

I don't have this library on my CentOS 5.1 system:

/usr/lib/php/modules/php_curl.so

but my PHP curl functions work.

Are you using a third party script?
Maybe you will need to modify the script not to call that library?

markkuk
Posts: 739
Joined: 2007/09/07 10:56:28
Location: Finland

Re: Need to install php_curl.so on Cent OS 5.2

Post by markkuk » 2008/11/12 09:17:40

Curl support is built-in in CentOS PHP. There are no packages to install and no dynamic libraries to load. Your PHP script should test the result of extension_loaded('curl') before trying to dl() the library. See: [url=http://www.php.net/manual/en/function.extension-loaded.php]http://www.php.net/manual/en/function.extension-loaded.php[/url] and [url=http://www.php.net/manual/en/function.dl.php]http://www.php.net/manual/en/function.dl.php[/url].
Actually, you shouldn't use dl() at all in scripts run from a web server. Extensions should be loaded from php.ini.

Post Reply

Return to “CentOS 5 - Webhosting Support”