we just migrated our production server to a new host (dedicated servers). And now we are unable resolve domain names from PHP pages when loaded from Apache. However, it works fine when we execute the php page from the command line. For example, the following PHP code returns the IP address when executed from command line but fails when page is loaded in browser thru Apache.
$ip = gethostbyname('www.google.com');
echo $ip;
Any thoughts? We are running Apache 2.4 on Windows Server 2012.
Thanks for your help.