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

error help - Dynamic Image
I've been working on making my site less cluttered in the directories and more secure lately. In an

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use

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

Code: <?php $CatID=$_

Multiple server callbacks (NOT POSTBACKS)
Hello, I have 2 different javascript client side functions that are on timers. When the timers elap

Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:

Write a multithreaded Java, Pt

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from

Trouble with a select list
Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!

How to refresh a parent page from a modal popup
Hi,I have a modal popup in which I need to upload a file and store in the database should give a mes

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