Using PEAR behind a proxy server that requires authentication

Posted on: Mar 06, 2008 by wenbert

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.


Subscribe to comments Comment | Trackback |
Post Tags: ,

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 AM

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

Alex added these pithy words on May 08 08 at 4:55 PM

Thank you for leaving a comment Alex ^_^

Wenbert added these pithy words on May 08 08 at 4:58 PM

Oh yeah

Thanks !

jobano added these pithy words on Aug 01 08 at 10:51 PM

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

michael added these pithy words on Aug 19 08 at 8:34 AM

Thank you very much for your help!

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

Greetings from Berlin/Germany!

Michael

Michael S. added these pithy words on Sep 03 08 at 6:48 PM

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″)

Jeff J. added these pithy words on Oct 10 08 at 8:11 AM

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?

Tom Pasley added these pithy words on Oct 30 08 at 8:15 AM

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.

Wenbert added these pithy words on Oct 30 08 at 9:03 AM

Thanks a LOT dude!

Alvin added these pithy words on Dec 04 08 at 12:57 PM

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

Progi1984 added these pithy words on Dec 26 08 at 9:02 PM

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

Wenbert added these pithy words on Dec 26 08 at 9:05 PM

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

That doesn’t run !

Progi1984 added these pithy words on Dec 26 08 at 9:13 PM

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

Wenbert added these pithy words on Dec 26 08 at 10:50 PM

Bad news !

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

Progi1984 added these pithy words on Dec 26 08 at 11:19 PM

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

Unblock Me added these pithy words on Jan 30 09 at 2:02 AM

Thank’s. Worked perfectly for me

dr.scre added these pithy words on Sep 23 09 at 3:30 PM

Hello from Russia

Polprav added these pithy words on Oct 12 09 at 3:57 AM

Add a Comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">


© Copyright 2007 eKini Web Developer Blog . Thanks for visiting!