Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include an http file produces errors even with allow_fopen_url = On

Status
Not open for further replies.

rosewoodblues

Programmer
Feb 1, 2005
8
US
this particular line in a php file:

<? include " ?>

wil produce:

[Fri Feb 25 14:03:03 2005] [error] PHP Warning: Unknown( failed to open stream: Operation timed out in /<actual place taken out>/index.php(15) : eval()'d code on line 36

I have allow_fopen_url = On and still nothing.....

I am relatively new to this and a bit confused since I thought that flag was all i had to set.
 
If this URL resides on the same fileserver as the script which is trying to include its output, I'd just perform an include using a filename. It's faster and uses fewer system resources.

The error you're getting does not indicate a problem with url_fopen. If that were true, you'd get a warning like:

PHP Warning: main(): URL file-access is disabled in the server configuration...

If your server could not resolve the address, you'd get a warning like:

PHP Warning: main(): php_network_getaddresses: getaddrinfo failed:

This is a timeout. I'd guess the destination web server didn't respond quickly enough.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top