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.
Browse Timeline
Comments ( 18 )
[...] Wenbert wrote an interesting post today onHere’s a quick selection [...]
Blog » Using PEAR behind a proxy server that requires authentication added these pithy words on Mar 25 08 at 5:14 AMThank you for google that I found your site and this page! You save my time with PEAR.
Thanks, always good to type ‘tool authenticated proxy’ and get the answer in 10 seconds
Thank you very much for your help!
I had the same problem and found your blog via google.
Greetings from Berlin/Germany!
Michael
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″)
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?
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.
But how can we do when the username contains an arobase ?
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
Like this
pear config-set http_proxy http://”myusername@myfai”:mypass@myproxy:8080 ?That doesn’t run !
try pear config-set http_proxy “http://myusername@myfai”:mypass@myproxy:8080
Bad news !
Connection to `myfai:mypass@myproxy:8080′ failed:
Just wanted to thank you for a really good post. I found it quite useful and will check your site often.


