I’ve been having some trouble getting CURL working with PHP on a server I inherited.
So far I have enabled the extension in my php.ini by uncommenting the extension=php_curl.dll line, and restarting apache.
However, I now receive the following error when starting PHP:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/php_curl.dll
The php_curl.dll file doesn’t exist in the aforementioned directory, and I can’t find anywhere legitimate to download it from(doesn’t seem to be included in PHP, or Curl).
UPDATE
Following the steps provided in the answer here, I was able to compile a new php_curl.so file and install it to the extensions directory.
Cudos go to Francois Deschenes!!
To compile a curl.so (php_curl.dll) module from scratch:
- Download and extract a new copy of your version of PHP.
- Open a terminal window and go to the curl directory (Type
cd php-5.3.3/ext/curl/). - Type
phpize. - Type
./configure. - Type
make. - Type
sudo make install. - Uncomment
extension=curl.soin your php.ini.
You should also make sure the extension is commented out before you start the processes, otherwise you may receive an error about the module already existing.
Following the steps provided in the answer here, I was able to compile a new php_curl.so file and install it to the extensions directory.
Cudos go to Francois Deschenes!!
To compile a curl.so (php_curl.dll) module from scratch:
cd php-5.3.3/ext/curl/).phpize../configure.make.sudo make install.extension=curl.soin your php.ini.You should also make sure the extension is commented out before you start the processes, otherwise you may receive an error about the module already existing.