Notice
After many tests, I found that even if I change the certificate according to the following practices, there will be “operation timed out” occasionally. Just try a few more times
Error
sudo pecl search mbstring
Connection to ` ssl://pecl.php.net:443 ‘ failed: Operation timed out
Solution steps
php -r “print_ r(openssl_ get_ cert_ locations());”
You will get similar results. Find default_ cert_ Path to file
Array
(
[default_cert_file] => /usr/local/php5/ssl/cert.pem
[default_cert_file_env] => SSL_CERT_FILE
[default_cert_dir] => /usr/local/php5/ssl/certs
[default_cert_dir_env] => SSL_CERT_DIR
[default_private_dir] => /usr/local/php5/ssl/private
[default_default_cert_area] => /usr/local/php5/ssl
[ini_cafile] => /usr/local/php5/ssl/cert.pem
[ini_capath] =>
)
Remember that the path of the certificate to be replaced is/usr/local/PHP5/SSL/cert.pem
wget http://curl.haxx.se/ca/cacert.pem (if Wget cannot be downloaded, please use the browser to download)
sudo mv cacert.pem /usr/local/php5/ssl/cert.pem
sudo pecl search mbstring
No releases available for package “pecl.php.net/mbstring”
After completion, there is no error prompt. It shows that you can connect. Unfortunately, you can’t find the mbstring extension
————————————————