Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using PHP 5.2.6 and need to configure it to use our forward proxy (which requires authentication be set) so that the PHP scripts can connect to the internet correctly.

I see that PHP.INI in the 4 version had a pfpro.proxyaddress option but that is no longer available - so what has replaced it?

share|improve this question

you can use curl for handling your http retrievals.

$ch = curl_init("");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, "");
curl_setopt($ch, CURLOPT_PROXYPORT, 3128);
curl_setopt ($ch, CURLOPT_PROXYUSERPWD, "user:pass");

more info here

share|improve this answer
CURLOPT_PROXY with ip:port and a separate CURLOPT_PROXYPORT with the same port sounds unneccesary – Karsten May 25 '09 at 9:45
@Karsten - yes. you're right. – pQd May 25 '09 at 11:34
-1: That is code related - I am looking for a configuration related method as in v4 that can be set so all requests are proxied. – Robert MacLean May 25 '09 at 14:34
@Robert MacLean - it seems what you ask for might be still not implemented - take a look at ; they also discuss kind-of-workaround with auto-append and changing settings of default context, but it's a hack – pQd May 25 '09 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.