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:
cd php-5.3.3/ext/curl/
). phpize
. ./configure
. make
. sudo make install
. extension=curl.so
in 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.
Why don't use
sudo port install php5-curl
(on php54: php54-curl)?
Download the 'port' using the following URL and install it:
http://www.macports.org/install.php
There are different versions and you can select one installation pack for your Mac Version.
After installed, open a terminal and type the following command to install directly,
$ sudo port install php5-curl
Otherwise - Login to port terminal by just typing
$ sudo port
and type
> install php5-curl
It will get few minutes to install all the dependancies and finally you will see the following message
---> No broken files found.
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.so
in 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.