New (temp) Account Copied... php_network_getaddresses errors

jvanv8

Member
Nov 10, 2006
22
0
151
I just transferred over from one server to a WHM machine and for the time being, I'd like to keep traffic going to the old server until I am certain the new WHM / CPanel server is working correctly.

So [not sure if this was necessary...] but I was afraid the transfer process would start propogating the DNS servers and the traffic would get routed to the new server in a few days... so I deleted the DNS entry... was that a good move? I just want to test using the temporary urls right now.


However, when I use the http:[ip_addess]/~[account name] some pages load fine, while others get many php errors such as:
Code:
Warning: file_get_contents() [function.file-get-contents]: 
php_network_getaddresses: getaddrinfo failed: 
Name or service not known in /home/blah, blah etc....
If I try to use a file_get_contents command for an external page (such as a webservice) I get the error:
Code:
[function.file-get-contents]: 
failed to open stream: 
Permission denied in /home/blah, blah etc....
The machine is a dedicated server running WHM / CPanel X:
WHM 11.23.2 cPanel 11.23.6-R26881
REDHAT Enterprise 5.2 x86_64 on standard - WHM X v3.1.0

Thanks for any help, I'm a newbie at this.
 

Infopro

Well-Known Member
May 20, 2003
17,076
521
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
The DNS will not propagate until you've updated the nameservers details at your registrar.

Many things you do on that account now, using the serverip/~user/ would cause errors if the config files or paths used on the site use the domain name in them. (using the full path including domain name for an image, as an example)

You shouldn't have had to edit anything, IMO. Other than to edit the site to use relative paths, like...

Instead of this:
http://yourdomain.com/images/yourimage.jpg
Use this:
images/yourimage.jpg


Might help. Good luck.
 

jvanv8

Member
Nov 10, 2006
22
0
151
Ok, just to rule out the possibility that the cause was due to deleting the DNS record through WHM, I removed the account, then transferred it again, this time leaving the DNS info (since it appears that it won't "steal" traffic from the current "live" website on the old server).

But the problem remains.
It is not an issue with images or relative addressing... basically its the fact that the php call:
Code:
$page = file_get_contents("http://www.yahoo.com");
... fails.

Why is this happening?
In WHM, the "PHP Configuration Editor" (Advanced Mode) shows that allow_url_fopen is on.