well - I'm no C-Programmer, but a standard nslookup, will query the right server and php doesn't.
If you could write a little test-c program that uses gethostbyname function call, I can test if the environment my be screwed somehow. We do run the server chrooted, but have copied all the files mentioned in man 3 gethostbyaddr to their appropreate locations.
I also copied an instance of the nslookup program into the environment, and it used the correct server. Switching the order in /etc/resolv.conf immediately changed the default server.