php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77522 PECL install fails for recent extensions
Submitted: 2019-01-25 21:47 UTC Modified: 2019-01-26 00:40 UTC
From: dpuglielli at magnitude dot com Assigned: petk (profile)
Status: Closed Package: PECL (PECL)
PHP Version: 7.3.1 OS: SUSE 12+
Private report: No CVE-ID: None
 [2019-01-25 21:47 UTC] 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>"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-25 23:16 UTC] 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 23:58 UTC] dpuglielli at magnitude dot com
Yes, that fixes the problem. Thanks!
 [2019-01-26 00:40 UTC] petk@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: petk
 [2019-01-26 00:40 UTC] petk@php.net
Good to hear. Have a nice day.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 06 20:01:29 2024 UTC