A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Using PEAR behind a proxy server that requires authentication

I kept getting this error:

pear list-all
File http://pear.php.net:80/rest/c/categories.xml not valid (received: HTTP/1.0 407 Proxy Authentication Required

The error was because my proxy required an authentication. To use PEAR behind a proxy that requires authentication use this:

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

You can change 80 to the port of your proxy.

This entry was posted in General and tagged , . Bookmark the permalink.

22 Responses to Using PEAR behind a proxy server that requires authentication

  1. Pingback: Blog » Using PEAR behind a proxy server that requires authentication

  2. Alex says:

    Thank you for google that I found your site and this page! You save my time with PEAR.

  3. Wenbert says:

    Thank you for leaving a comment Alex ^_^

  4. jobano says:

    Oh yeah

    Thanks !

  5. michael says:

    Thanks, always good to type ‘tool authenticated proxy’ and get the answer in 10 seconds

  6. Michael S. says:

    Thank you very much for your help!

    I had the same problem and found your blog via google.

    Greetings from Berlin/Germany!


  7. Jeff J. says:

    Also, if your password contains a pipe character “|” you will have to enclose the entire proxy url in quotes (ie: “http://user:th|s@proxyserver:80″)

  8. Tom Pasley says:

    just wondering if there’s a way we can set this up by editing pear.bat (for Windows)… would it be something like:
    SET http_proxy=”http://proxy.somewhere.net”

    - or does this just not work?

  9. Wenbert says:

    Hi Tom, I have not tried doing this in Windows. At work, I use Windows, but I have PHP and the rest of the stuff in a *nix box.

  10. Alvin says:

    Thanks a LOT dude!

  11. Progi1984 says:

    But how can we do when the username contains an arobase ?

  12. Wenbert says:

    i think you can enclose the username in double quotes. my username contains the @-sign and i am able to use pear behind a proxy

  13. Progi1984 says:

    Like this
    pear config-set http_proxy http://“myusername@myfai”:mypass@myproxy:8080 ?

    That doesn’t run !

  14. Wenbert says:

    try pear config-set http_proxy “http://myusername@myfai”:mypass@myproxy:8080

  15. Progi1984 says:

    Bad news !

    Connection to `myfai:mypass@myproxy:8080′ failed:

  16. Unblock Me says:

    Just wanted to thank you for a really good post. I found it quite useful and will check your site often.

  17. dr.scre says:

    Thank’s. Worked perfectly for me

  18. Polprav says:

    Hello from Russia

  19. Ntsakzin says:

    Hello from South Africa. This was very helpfull even though mine only worked when I changed the … http_proxy http://username… to pear … http_proxy http://username

  20. Pingback: Habilitando proxy no PEAR (Windows) | Lincoln Brito

  21. Daniel says:

    This was very helpful!! Thanx!

  22. Garth Arnold says:

    Thanks for the clear example on how to resolve this.

Leave a Reply to Wenbert Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>