我从源代码安装了 php7.2.2,并开始通过pecl install sqlsrv
. 它响应pecl search sqlsrv
,但通知我运行pear channel-update pear.php.net
,之后搜索和安装都无法使用此错误消息:
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?
我阅读了各种建议,例如
http://forums.devshed.com/php-development-5/ssl-issue-pear-channel-update-pear-php-net-970623.html
和
pear channel-update 后的 SSL 问题pear.php.net,但我在任何地方都没有“openssl.so”库(在某处我读过 php7 已弃用它),php -r "print_r(openssl_get_cert_locations());"
发现函数未定义,并引用openssl.cafile=/opt/php/lib/php/extensions/no-debug-non-zts-20170718/cacert.pem
从http://curl.haxx.se/ca/cacert 下载的函数。 php.ini 中的pem(不出所料)证明是徒劳的。如果在那个愚蠢的更新之前它运行良好,会发生什么?