Portal Home > Knowledgebase > Articles Database > Server doesn't know IP address?


Server doesn't know IP address?




Posted by toasty2, 10-11-2009, 08:18 PM
I have two VPSs running Ubuntu, one is openvz and the other is Xen. Neither seems to know its own IP address as evidenced by the phpsysinfo script I've run on both. The "listening IP" field is blank. I didn't have this problem with my previous dedicated server that ran the same script but on Windows. It appears that somehow PHP doesn't have the SERVER_ADDR superglobal defined. Any idea how I can fix this? I'm running PHP 5.2.6. I ran a test with:And got:

Posted by Servax, 10-11-2009, 09:34 PM
What web server are you running? It could be it's not passing on SERVER_ADDR on, it could be HTTP_HOST only or something of that sort. Make a phpinfo() page and take a look at what variables are provided under "Environment".

Posted by servertechs, 10-12-2009, 04:02 AM
In vps the the network interface are virtual, it seems to me that the script does not work on vps.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Best Reseller?? (Views: 719)
HostDime vs Choopa (Views: 775)


Language: