Forum Moderators: phranque

Message Too Old, No Replies

Unstable Includes

         

craigrom

8:29 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



Hello,

I have several sites spread across different servers and have yet to run into this problem until we started using this new dedicated server.

The problem is that my template includes seem to be randomly unstable. One minute all the includes will show up just fine then later on, only one or two of the 5 or so includes show up. If I hit refresh, sometimes the entire page will show up...sometimes not.

If I give it few minutes usually the entire page will load. However, again the problem comes back later.

This seems to happen on different browsers, different machines etc. I can't seem to pinpoint the problem and neither can tech support.

I'm running Rsseq on all sites...and it's only on this server where I'm having this problem. The server is top notch with and built to handle big db apps.

I'm running following handler in .htaccess file.
----------
AddType application/x-httpd-php htm html to serve up the php includes and rss.

I also occasionally get this error:

Warning: main(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/httpd/vhosts/mysite.com/httpdocs/index.html on line 21

The error is related with using full addresses when including a file.

If you scroll down the page you'll notice RSS is working because we are using relative paths (../rss/rss.php)

includes aren't because we use absolute paths: "http://example.com/inc/top.html"

The problem appears when using absolute paths to include a file.

Any help on this would be greatly appreciated.

Craig Romero

[edited by: jdMorgan at 12:53 am (utc) on Feb. 18, 2005]
[edit reason] Removed specifics per TOS. [/edit]

jdMorgan

4:22 am on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Craig,

Welcome to WebmasterWorld!

Looks like a DNS problem... Your server can't get a response to its requests to the DNS system for a translation of the domain name to an IP address.

Q: Do you have to use URLs, instead of local file-paths? Not sure what you're doing with the includes, but it seems awfully inefficient...

Jim

craigrom

4:43 pm on Feb 18, 2005 (gmt 0)

10+ Year Member



Hello Jim,

Yes, you're right. My host stated last night that it was indeed a problem with dns.

It also seems there was an issue regarding DNS when looking up non-exixtent names. So the Host added another nameserver to the config. file.

It seems the server could not get a response to it's requests to the DNS system for translation of the domain name to an IP address.

I also read in an Apache forum that this may be a compatibility bug with 4.0.16 to 4.3.4 on Apache 1.3.27 when combined with RedHat 9.

Either way my team is busy changing all our sites on this server today to:

<?php

include($_SERVER['DOCUMENT_ROOT'] . "/inc/yourfile.html");

?

In tests this seems to have solved the problem.

I sure hope it does.

Thanks again for your prompt response Jim.

I truly appreciate it.

Craigrom