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

Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.

Wrong Info sent Using $get in form
Hi i have this code that i tried to make to send some info from one page to aother with lots of ppls

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

Just wondering what you think about my site
I am new to phpfreaks i just seen this form and thought it would be cool to see what other thought a

Displaying image pathname instead of image
Hello

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

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

Clean URLs
Hi I was wandering if anyone has ever implemented URLs on their PHP run website using URLS like wiki

How to write on database when a link is clicked?
Hi, I have a list of products in a gridview. When the link is clicked currently it takes to an ext

Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/

Word filter problem
Hello,

im trying to make a filter for words inputted in to my website but i want to store the

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