How to use PEAR behind proxy?

后端 未结 4 426
感动是毒
感动是毒 2020-12-23 20:34

Initially I used the following with no success;

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

Worth noting I don\'t get a connection

相关标签:
4条回答
  • 2020-12-23 21:07

    Instead of using the system's http_proxy, set the proxy directly in pear's config;

    pear config-set http_proxy http://username:password@yourproxy:80
    
    0 讨论(0)
  • 2020-12-23 21:09

    You also may have an issue with your sudo user having different configuration from your user for pear.

    If you make this :

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

    Then

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

    You have change user and the proxy is still not set.

    So use the appropriate command:

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

    (Issue spotted on Ubuntu 11.04 fresh install)

    0 讨论(0)
  • 2020-12-23 21:28

    Note that pear config-set http_proxy works whereby pecl config-set http_proxy does not, even though pecl config-get http_proxy does.

    That one cost me me quite a bit of hair pulling :-)

    0 讨论(0)
  • 2020-12-23 21:31

    This will remove proxy settings:

    pear config-set http_proxy ""
    
    0 讨论(0)
提交回复
热议问题