Bug #77522 [Opn->Csd]: PECL install fails for recent extensions
| From: | petk@php.net | Date: | Sat, 26 Jan 2019 00:40:48 +0000 |
| Subject: | Bug #77522 [Opn->Csd]: PECL install fails for recent extensions | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-15717@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77522&edit=1
ID: 77522
Updated by: petk@php.net
Reported by: dpuglielli at magnitude dot com
Summary: PECL install fails for recent extensions
-Status: Open
+Status: Closed
Type: Bug
Package: PECL
Operating System: SUSE 12+
PHP Version: 7.3.1
-Assigned To:
+Assigned To: petk
Block user comment: N
Private report: N
New Comment:
Good to hear. Have a nice day.
Previous Comments:
------------------------------------------------------------------------
[2019-01-25 23:58:53] dpuglielli at magnitude dot com
Yes, that fixes the problem. Thanks!
------------------------------------------------------------------------
[2019-01-25 23:16:37] petk@php.net
Hello, I think this has been now fixed in the pecl command line script which is part of the pear
core repository [1].
A quick workaround until PEAR can be updated, is to manually edit the pecl command line script:
which pecl
vim /path/to/bin/pecl
and remove the -n option in the last line as it was done in the linked conmit.
[1] https://github.com/pear/pear-core/commit/f94454a74785865cec50bf9d64c410efc29b587a
Please report back if that changes anything.
------------------------------------------------------------------------
[2019-01-25 21:47:41] dpuglielli at magnitude dot com
Description:
------------
Trying to install any recent extension using PECL fails with the error message:
Could not download from "https://pecl.php.net/get/<extension>",
cannot download "pecl/<extension>" (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?)
Error: cannot download "pecl/<extension>"
By recent I mean after about 11 November 2018 (deduced by trying different versions of different
extensions until I narrowed down the date). As far as I can tell, this affects any version of any
extension for PHP 7+, with PHP downloaded from the SUSE repositories on SUSE 12 or 15. The install
command is 'zypper install php7 php7-pear php7-devel'. The problem is not fixed by
installing the OpenSSL package from the repos (php7-openssl).
This does not appear to affect any other platform. It is not clear to me if this is a PHP bug or a
SUSE bug.
A couple of people seem to have had this problem online, the suggested workaround is to force PECL
to read php.ini when executing the PHP binary by removing the -n switch from PHP calls. See this
issue: https://github.com/lazyfrosch/docker-icingaweb2/issues/1.
The presence of the -n switch explains why downloading the openssl extension does not work, since
that extension is loaded from an ini file.
Test script:
---------------
For example,
pecl install decimal
Expected result:
----------------
Extension should begin to download and install.
Actual result:
--------------
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update
pecl.php.net" to update
Could not download from "https://pecl.php.net/get/<extension>",
cannot download "pecl/<extension>" (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?)
Error: cannot download "pecl/<extension>"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77522&edit=1