In my case, there was a problem: pecl.php.net did not respond when the "Accept-Encoding:" header was completely empty.
Adding one space to this line in the source code of the pear is a solution to the problem.
file: /usr/local/lib/php/PEAR/REST.php
line ~ 405
$request .= "AcceptEncoding:\r\n"; //<---original line $request .= "AcceptEncoding: \r\n"; //<--changed to this (added space)
... or a simple script can do the change:
#!/usr/bin/env bash target=`pecl config-get php_dir`/PEAR/REST.php [ -f "$target" ] || { echo file $target not found; exit; } sed -i 's/Accept-Encoding:\\r\\n/AcceptEncoding: \\r\\n/g' $target
source share