What are causes of a connection-timeout with fopen()?


Posted on 16th Feb 2014 07:03 pm by admin

Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.* to 5.2.4. Not just PHP was upgraded, MySQL, postGres, and (I think) Apache were upgraded as well. Before the upgrade, my site worked perfectly.

But now, whenever I access my site, it takes a long time to complete a request and all that is returned is "Warning: fopen(<THE_URL>) [function.fopen]: failed to open stream: Connection timed out in..."

I know where the error is -- it's in my templating class. I check the remote server's configuration and the directive "allow_url_fopen is enabled and safe_mode is disabled.

The strange thing is that my script works on my local server perfectly which is using PHP build 5.2.5. I looked for any differences between my local-server's PHPINFO() and my remote-server's PHPINFO() and, while I didn't find anything eye-catching yet, I noticed that virtual-directory-support is disabled on my remote-server and it is enabled on my local-server. Would that be what's causing the problem? If not, what are some potential causes for fopen() to behave this way?

No comments posted yet

Your Answer:

Login to answer
228 Like 12 Dislike
Previous forums Next forums
Other forums

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

1,000 select boxes with 100 options?!
I have 1 drop down select box with 1,000 options.


In some case, there will be 100+ of the

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

Need help with unexpected T-STRING error
I'm a newbie and I'm still learning PHP. However this error has me stumped. I've googled, searched t

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

Scheduler problems related to execution of a single BLT by many schedules
Hello all,

We are running several MII instances in a distibuted architecture using a sing

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash