Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007

    Server doesn't know IP address?

    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:
    PHP Code:
    <?php error_reporting(E_ALL); echo $_SERVER['SERVER_ADDR']; ?>
    And got:
    Notice:  Undefined index:  SERVER_ADDR in /srv/www/server/ip.php on line 1

  2. #2
    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".
    || Dennis Liang,
    || ServaxNet LLC

  3. #3
    Join Date
    Jan 2008

Similar Threads

  1. Replies: 4
    Last Post: 08-18-2009, 10:10 AM
  2. leave your server address, dedicated server speed test
    By a1001800 in forum Other Reviews
    Replies: 8
    Last Post: 02-03-2008, 01:58 AM
  3. Should taxes depend on billing address or shipping address?
    By Mark226 in forum Web Hosting Lounge
    Replies: 3
    Last Post: 03-25-2005, 09:38 PM
  4. Replies: 8
    Last Post: 07-24-2002, 08:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts