Workbench: Programming, Publishing, Politics, and Popes

Subscriptions

Menu

Working On

Miscellany

Technorati

XFN Friendly

Addressing a PHP Name Resolution Glitch

My PHP error logs have been filling up with an ominous error message:

PHP Warning: main(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure)

I don't know about the low-level cause for the problem, but I've figured out why it's happening so often on my server. I had the bad habit of using URLs in include statements for local pages, like this:

include 'http://ekzemplo.com/menu.htm';

This was causing some pages to require three or more extra domain name lookups, just to pull files from my own server! I'm switching these statements to local file references:

include '/www/ekzemplo/menu.htm';

Server performance has improved noticeably, though I still have no idea what any of this has to do with IPV6.

Comments

I (almost) hate to point this out, but that's still not technically a "relative" file reference, it's an absolute path, since it begins with "/" rather than a "./" or a null prefix.

But yeah, that's a rather good thing not to be doing.


 

Thanks -- I've corrected it.


 

Add a Comment

These HTML tags are permitted: p, b, i, a, and blockquote. A comment may not include more than three links. Participants in this discussion should note the site's moderation policy.

:
:
:

Twitter

How is it even possible to spend $3,000 a month on online porn? The repetitive motion stress would be enormous. about 13 hours ago