SSL issue after pear channel-update pear.php.net

后端 未结 5 1347
遇见更好的自我
遇见更好的自我 2021-01-05 00:01

I have XAMPP on Windows7. after update the pear.php.net channel with:

pear channel-update pear.php.net

and try for installing new packages,

相关标签:
5条回答
  • 2021-01-05 00:46

    In my mac, and based of chintan reply, I did it:

    /Applications/XAMPP/bin/php -r "print_r(openssl_get_cert_locations());"
    

    ... to show the default_cert_file

    Array
    (
        [default_cert_file] => /Applications/XAMPP/xamppfiles/share/openssl/cert.pem
        [default_cert_file_env] => SSL_CERT_FILE
        [default_cert_dir] => /Applications/XAMPP/xamppfiles/share/openssl/certs
        [default_cert_dir_env] => SSL_CERT_DIR
        [default_private_dir] => /Applications/XAMPP/xamppfiles/share/openssl/private
        [default_default_cert_area] => /Applications/XAMPP/xamppfiles/share/openssl
        [ini_cafile] => /Applications/XAMPP/xamppfiles/share/curl/curl-ca-bundle.crt
        [ini_capath] => 
    )
    

    Then a get the last version of cacert.pem:

    wget http://curl.haxx.se/ca/cacert.pem
    

    And then I moved it to the correct place of default_cert_file:

    sudo mv cacert.pem /Applications/XAMPP/xamppfiles/share/openssl/cert.pem
    
    0 讨论(0)
  • 2021-01-05 01:01

    In XAMPP 7.1 on Windows .bat-files of PECL and PEAR may be reason way SSL not work. If in place command php peclcmd.php list-all work for you, then this may because you use correct php.ini file. Just add option -c "%PHP_PEAR_BIN_DIR%\php.ini" to in .bat-file command (your php.ini may be in another path). It's hold be in :RUN section.

    0 讨论(0)
  • 2021-01-05 01:02

    recently I faced this issue with macOS Sierra with XAMPP 7.0

    I updated pecl channel wiht

    sudo pecl channel-update pecl.php.net
    

    and then I was getting

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

    My solution is as below

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

    check default_cert_file path

    then download certificate from http://curl.haxx.se/ca/cacert.pem rename it and place it at default_cert_file path

    then try pecl list-all

    it should work fine

    0 讨论(0)
  • 2021-01-05 01:04

    This is a bug that happens in combination of PEAR 1.9.x with PHP 5.5+.

    Please upgrade to PEAR 1.10.0dev1 (or the latest 1.10.0dev2) which fixes this issue.

    0 讨论(0)
  • 2021-01-05 01:07

    For me on Windows 10 in %PHP_PEAR_BIN_DIR%\pecl.bat, the line starting "%PHP_PEAR_PHP_BIN%" -C -n -d; removing the "-n" worked for me.

    0 讨论(0)
提交回复
热议问题