Reputation: 1
Recently I opened my error_log files and noticed that it have several include() related error message. Website have about 1500 daily visitor but this message shows only about 3 times in month for example I may have group of 10 error on 06 Feb then group of 15 error on 20 Feb etc.
Here's example of error text:
[05-Jun-2013 15:57:39] PHP Warning: include() [function.include]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/user33/public_html/example/file3.php on line 6
[05-Jun-2013 15:57:39] PHP Warning: include(http :// www . example . com/file.php) [function.include]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/user33/public_html/example/file3.php on line 6
or
[19-Jul-2013 17:42:17] PHP Warning: include() [function.include]: Failed opening 'http:// www. example. com/ file.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user33/public_html/example/file4.php on line 5
[19-Jul-2013 17:42:17] PHP Warning: include(http: // www. example. com/file.php) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/user33/public_html/example/file5.php on line 11
P.S. Website don't use any CMS and have simple page that contains mostly HTML code with several PHP includes.
P.S. 2. Does using absolute path in include() may lead to this errors? e.g. I use include("http://www.example.com/file.php") instead of include("../file.php").
What that may be?
Upvotes: 0
Views: 292
Reputation: 602
Yes, you have an issue because you are using include("http://www.example.com/file.php")
instead of include("../file.php")
see include docs for more details
Upvotes: 2