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.

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.