Sep. 17th, 2009

flewellyn: (Default)
This is a note for anyone out there who has run into this problem on Mac OS X Server: your program needs to resolve a host name, and works fine from the command line. However, when run from Apache, host names fail to resolve, and you get the error message "temporary failure in name resolution" in your Apache error_log. You may be tearing your hair out, because from the command line, DNS resolution works fine, but somehow, any program run from Apache can't resolve a DNS lookup.

The problem is not with your DNS server, or your Apache setup. It does not depend on what language you use to write your programs, either. You need to make sure that httpd starts using the program "StartupItemContext" so that its Mach ports are set up correctly! This is found in /usr/libexec/ and will fix the problem.

So, you must use /usr/libexec/StartupItemContext to run Apache. This will fix it. Do this!

And boost the signal! I drove myself nearly crazy looking for solutions for months before I found this out.

Profile

flewellyn: (Default)
flewellyn

July 2014

S M T W T F S
  12345
6789101112
13141516 171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 17th, 2025 07:04 pm
Powered by Dreamwidth Studios