You are currently viewing archive for November 2010

pear behind a proxy server

So it turns out that pear (PHP Extention and Application Repository - ) completely ignores the $http_proxy environment variable:
hostname:~ # pear install HTML_Template_IT
No releases available for package ""
Cannot initialize 'channel://', invalid or missing package file
Package "channel://" is not valid
install failed

Pear has its own configuration, complete with proxy server setting:

hostname:~ # pear config-show
Configuration (channel
Auto-discover new Channels auto_discover
Default Channel default_channel
HTTP Proxy Server Address http_proxy

So once that is updated with the system proxy server, everything works just fine:
hostname:~ # pear config-set http_proxy $http_proxy
config-set succeeded
hostname:~ # pear install HTML_Template_IT
WARNING: channel "" has updated its protocols, use "channel-update" to update
downloading HTML_Template_IT-1.3.0.tgz ...
Starting to download HTML_Template_IT-1.3.0.tgz (23,309 bytes)
........done: 23,309 bytes
install ok: channel://