Environment: php5.5.5 + nginx
Task: Install the PHP Curl extension and support HTTPS
The pit of blood and tears: I first installed curl, found that does not support HTTPS, and then install OpenSSL, but everything is late, toss a half-day, or to reinstall.
Method:
First install OpenSSL, directly
SHELL
Yum-install Opensslyum-install Openssl-devel
Then reinstall Curl, after installation, remember CURL-V test the support does not support HTTPS
SHELL
wget http://curl.haxx.se/download/curl-7.24.0.tar.gztar-xzf curl-7.24.0.tar.gz cd curl-7.24.0./configure--prefix= ( Installation path)--with-ssl= (SSL installation path) Makemake Install
Then export the current PHP compiler parameters
SHELL
/usr/local/php/bin/php-i | grep Configure
Go to the PHP installation file directory, and if you don't, download a
SHELL
/usr/local/php/bin/phpize./configure--with-curl= (Installation path)--with-openssl= (Installation path)//The compilation parameters just exported plus these 2 Makemake install
If you don't make an error, restart Nginx and PHP-FPM!