Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

xampp

pear

pecl

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, for example pecl install zmq , encountered with following message and can not install any package:

Connection to 'ssl://pecl.php.net:443' failed: Unable to find the socket 
transport "ssl" - did you forget to enable it when you configured PHP?

I very searched in net and tried to solve it but cannot resolve it. can anyone help me for resolve that and what is the reason?

like image 231
msoa Avatar asked Aug 05 '15 20:08

msoa


1 Answers

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

like image 70
chintan adatiya Avatar answered Oct 17 '22 04:10

chintan adatiya