Jump to content

Error: PHP's readfile() being blocked accidentally


T-Bird

Recommended Posts

I have a similar topic floating in the PHP board - for good reason.  When I started off I was sure my problem was an error in my PHP configuration, as I further tested I have become convinced it is an error in my server configuration.  That said, sorry if anyone is offended by my reasking.

 

I have a file sitting on my local file server.  Do to unfortunate circumstance, this is a WinXP Home box running WAMPServer2.  I have opened my router/firewall. I have taken Apache off the usual port 80 and put it on port 880.  Direct links to the files work fine - meaning if end-user types "MYIP:880/file.pdf" they get the file.  However, when I use my remote web host (run by Network Solutions) to access the file via PHP's readfile() command, I get a connection timeout error.  Similar functions like file_get_contents, fopen, and cURL all fail similarly.  My web host does indeed have allow_url_fopen turned on in it's php.ini (it can use this same readfile() process for files on other machines).

 

It seems to me the problem must be an error in the configuration of Apache on either my webhost or, in all likelyhood, my file server.  I'd be willing to look into faulty access configurations in windows as well.

 

To save space, I'm not going to reprint the diagram/explanation of my full testing here.  If you feel it would help, it can be found here.

Link to comment
Share on other sites

  • 1 month later...

if i see correctly, you're connecting to port 880. try connecting to the standard port 80, i just tried with my networksolutions account, and i can successfully connect to port 80, but not for example to port 2222, which gives a timeout.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.