Install PHP-curl

2018-07-31 09:29:14    Jon    9013

Linux


1.CentOS

php installation package path:/data/php5.6.14/
PHP installation path:/usr/local/php/


(Set the path according to your actual situation. Below is an example)


Find the directory of curl in PHP installation package.

cd /data/php5.6.14/ext/curl/

Execute phpize

/usr/local/php/bin/phpize

Compile and install

./configure --with-php-config=/usr/local/php/bin/php-config
make && make install



Now curl.so is in the directory of /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/



Add the code below to php.ini


extension=curl.so



Restart PHP and check whether PHP-curl is installed using phpinfo()



2.Ubuntu

Use the command below to install

sudo apt-get install php5-curl


Then restart it.


Windows


1. In the PHP folder: copyphp_curl.dll,libeay32.dll,ssleay32.dll to C:\WINDOWS\system32
2、Remove ";" from ;extension=php_curl.dll
3、Restart it.

ZSite8.0