Cómo usar PEAR behind proxy?


Inicialmente usé lo siguiente sin éxito;

export http_proxy=http://username@password:host:port

Vale la pena señalar que no recibo un error de conexión directamente, en su lugar;

[root@pal ~]# sudo pear info  PHP_CodeSniffer-1.2.1
No information found for `PHP_CodeSniffer-1.2.1'
Author: Daniel Morris, 2010-02-15

4 answers

En lugar de usar el http_proxy del sistema, establezca el proxy directamente en la configuración de pear;

pear config-set http_proxy http://username:password@yourproxy:80
 85
Author: Daniel Morris,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-02-15 14:21:54

También puede tener un problema con su usuario sudo que tiene una configuración diferente de su usuario para pear.

Si haces esto :

pear config-set http_proxy http://username:password@yourproxy:80

Entonces

sudo pear channel-discover pear.symfony-project.com

Tiene cambiar usuario y el proxy todavía no está configurado.

Así que usa el comando apropiado:

sudo pear config-set http_proxy http://username:password@yourproxy:80

(Problema detectado en Ubuntu 11.04 fresh install)

 13
Author: Damien,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-05-09 15:59:36

Tenga en cuenta que "pear config-set http_proxy" funciona mientras que "pecl config-set http_proxy" no lo hace, aunque "pecl config-get http_proxy" lo hace.

Ese me costó bastante tirarme del pelo: -)

 4
Author: boran,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-09 13:12:47

Esto eliminará la configuración del proxy:

pear config-set http_proxy ""
 3
Author: czezz,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-04-02 08:04:37