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..."
Did you know?Explore Trending and Topic pages for more stories like this.
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
12
Other forums
Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists
Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to
generating random codes
Hi guys n gals,
I have a requirement to generate 250,000 unique codes...
These codes a
Validation
Hello
I know this is a really vag question.
I need to have a input field on a form th
Getting rid of quotes when printing data
Hi Guys, I use the filter_var FILTER_SANITIZE_STRING to filter the textarea input. The function esca
use an array from 1 class in a second class
I have a class that adds data to an array
Then I have a second class and I need to check if t
help with image text
Hi ...
see i need the text of the name and number to start in the center and always be in the
PHP Directory Listing Not working
Hey Guys,
I need help, I tried a ton of directory listing scripts and they all don't work. Al
Using the $_GET variable to view certain records
Hello,
First let me explain my problem, I have 2 pages the first page pull a list of Guide ti
User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b