Apache/PHP can't resolve hostnames

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Apache/PHP can't resolve hostnames

Postby christh21 » 18. October 2004 04:36

Apache can't resolve any hostnames. I want to use PHP to read a webpage, but it fails when I use a named-URL (like checkip.dyndns.org), but if I put in the IP address, it works just fine. However, if I run PHP at the command prompt, I CAN use the URL and it resolves just fine. I also noticed this problem when setting up a page to run PING and return the results. If I run PING on an IP address, it works fine, but if I pass a named-URL as the argument, it can't resolve it.

Obviously I have some problems with my DNS configuration. Anything run as root or user works just fine in resolving addresses, but anything running within Apache can't.

Any ideas? I'm running DeLi linux 0.6 (based on Slackware 7.1).
christh21
 
Posts: 11
Joined: 13. September 2004 04:30

Postby christh21 » 18. October 2004 05:24

I fixed it so if anyone else is having PHP getaddrinfo errors...

my resolv.conf file was in a folder "ppp" that had the wrong permissions to allow non-root access. I chmoded it to 755 and now it works fine.
christh21
 
Posts: 11
Joined: 13. September 2004 04:30


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 20 guests