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

Help Ordering Arrays
Hi, I have 3 arrays as shown below.

Code: $users = $this->get_latest_users();
$flir

Accessing Infotype data in dialog program
Hi All
In Dialog programs attributes I didn't see any logical database field. How can I access

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

Preserving user-entered linebreaks
Hi, I'm building a web 2.0 thingy from scratch and I wanna display text which users input. It's all

Email Form Syntax Issue
I need the TO: in email to display To: CEO instead of To: abc@mail.com

How to alter the scri

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:

Code

Printing a webpage
I use this to print the webpage: o

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

Most basic form question ever?
Hello,

I want to use this snippet to make sure the fields in a form are ok before processing

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