Install PEAR class packages through a proxy

chris (2005-02-14 17:44:11)
0 replies
I was on-site with a client the other day and decided to install some PEAR modules on one of their webservers.. I got the following message:

root@host:/export/newtos/etc# pear install MDB
Connection to `' failed: Connection refused

I realised that the machine was behind a squid web proxy which wasn't allowing the connection through.. it took a bit of fiddling around and googling, but it seems the easy way around this is to define an enviromment variable called $http_proxy like so:

root@host:/export/newtos/etc# export http_proxy=

Just make sure you have the right IP and port number in place..