The support for Curl in CentOS 6.2 system is NSS version, not OpenSSL, so when PHP uses curl to access HTTPS, it will report unable to load client key-8178 error, in Google Group inside found inspiration, is also curl and HTTPS, inside said is curl problem:
https://groups.google.com/forum/?fromgroups=#!topic/pongba/sgMYM9dGI7k
According to the link said, to the official website to download a latest version (curl-7.28.1.tar.gz) of curl, to compile the source code.
Compiled dependencies, OpenSSL and Openssl-devel.
The compile method is similar to the other software, with the following steps:
Go to source directory: curl-7.28.1
./configure--without-nss--with-ssl && make &&make install to complete the compilation.
Then you add curl lib to path, which is also mentioned in Google Group.
echo "/usr/local/lib" >>/etc/ld.so.conf && ldconfig
At this point, running PHP from the command line calls Curl with the certificate to access the Web PHP program is OK. But with the Web interface or the previous unable to load client key-8178 problem, PHP needs to be recompiled.
If you often need to install a new PHP application on a Linux server, you will inevitably encounter situations where you need to recompile PHP and add new functionality to it. After recompiling PHP, on the one hand need to replace the original PHP, on the other hand need to ensure the normal operation of other online sites, you need to smooth replacement of PHP. How is this process supposed to proceed? Give me a little bit of my experience in this area.
1, find out the original PHP configuration parameters
~:p Hp-i|grep Configure
Configure Command = './configure '--prefix=/usr/local/php '--enable-mbstring '--enable-fastcgi '--enable-fpm ' '--with-curl '--with-mysql=/usr/local/mysql '--with-mysqli=/usr/local/mysql/bin/mysql_config '
./configure '--prefix=/www/wdlinux/apache_php-5.2.17 '--with-config-file-path=/www/wdlinux/apache_php-5.2.17/ etc '--with-mysql=/www/wdlinux/mysql '--with-iconv=/usr '--with-mysqli=/www/wdlinux/mysql/bin/mysql_config '-- With-pdo-mysql=/www/wdlinux/mysql '--with-freetype-dir '--with-jpeg-dir '--with-png-dir '--with-zlib '-- With-libxml-dir=/usr '--enable-xml '--disable-rpath '--enable-discard-path '--enable-inline-optimization '-- With-curl=/usr/local/curl '--enable-mbregex '--enable-mbstring '--with-mcrypt=/usr '--with-gd '-- Enable-gd-native-ttf '--with-openssl '--with-mhash '--enable-ftp '--enable-bcmath '--enable-exif '-- Enable-sockets '--enable-zip '--with-apxs2=/www/wdlinux/apache/bin/apxs '
CentOS Curl version NSS changed to OpenSSL