Connection to `ssl://pecl.php.net:443' failed:


1. Run the following command in putty: 

Code
php -r "print_r(openssl_get_cert_locations());"



2. It returns an array like this: 

Array 

    [default_cert_file] => /usr/local/apps/etc/openssl/cert.pem 
    [default_cert_file_env] => SSL_CERT_FILE 
    [default_cert_dir] => /usr/local/apps/etc/openssl/certs 
    [default_cert_dir_env] => SSL_CERT_DIR 
    [default_private_dir] => /usr/local/apps/etc/openssl/private 
    [default_default_cert_area] => /usr/local/apps/etc/openssl 
    [ini_cafile] => 
    [ini_capath] => 


3. Note that  /usr/local/apps/etc/openssl/cert.pem isn't present. Download a cUrl cert bundle , as suggested by this thread from Stackoverflow 

4. save the bundle in  '/usr/local/apps/etc/openssl/'  and rename it as 'cert.pem' 

Everything has been fixed. I thought it would be troublesome but turned out it was easy as pie~


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM