2

I installed php7.2.2 from source, and started obtaining mssql extension by pecl install sqlsrv. It responded to pecl search sqlsrv, but notified me to run pear channel-update pear.php.net, after which both search and install failed to work with this error message:

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 read all kinds of suggestions like http://forums.devshed.com/php-development-5/ssl-issue-pear-channel-update-pear-php-net-970623.html and SSL issue after pear channel-update pear.php.net , but I have no "openssl.so" library anywhere (somewhere I read php7 deprecated it), php -r "print_r(openssl_get_cert_locations());" finds the function undefined, and referencing a downloaded openssl.cafile=/opt/php/lib/php/extensions/no-debug-non-zts-20170718/cacert.pem from http://curl.haxx.se/ca/cacert.pem in php.ini (unsurprisingly) proves futile. What is going on if it worked fine before that silly update?

bpstrngr
  • 339
  • 3
  • 13
  • I rebuilt the whole thing, the exact massage is `WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update`. Well Don't do it folks... – bpstrngr Feb 06 '18 at 09:31

1 Answers1

3

I have had a similar problem with OpenSUSE LEAP 15.0.

After pear list-updates, I've got a warning saying that I had to update the PECL channel protocol. After pear channel-update pecl.php.net, whenever I try to install or update a PECL extensión I get the following error.

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?

However, PEAR is working fine.

Checking the differences between PEAR and PECL commands, I've seen that in PECL the last line that runs PHP uses the -n option that tells PHP not to use php.ini. The OpenSSL extension is not enabled and, therefore, the SSL and TLS socket transports are not registered.

I don't know if this is intentional but, I think, it is a little inconsistent.

apaderno
  • 28,547
  • 16
  • 75
  • 90
  • Thanks for the explanation! It appears this was subsequently reported in [PHP Bug 77522](https://bugs.php.net/bug.php?id=77522) and fixed for `pecl.sh` in [f94454a7](https://github.com/pear/pear-core/commit/f94454a74785865cec50bf9d64c410efc29b587a) but never fixed for `pecl.bat`. I've submitted https://github.com/pear/pear-core/pull/126 to fix it as well. – Kevinoid Apr 10 '23 at 00:54