#24515 [Opn->Fbk]: $_SERVER[remote_addr] different to $remote_addr

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default #24515 [Opn->Fbk]: $_SERVER[remote_addr] different to $remote_addr

    ID: 24515
    Updated by: [email]sniper@php.net[/email]
    Reported By: phpbug at easihosting dot co dot uk
    -Status: Open
    +Status: Feedback
    Bug Type: Scripting Engine problem
    Operating System: linux
    PHP Version: 4.3.3RC1
    New Comment:

    Which webserver are you using?
    What was the configure line used?



    Previous Comments:
    ------------------------------------------------------------------------

    [2003-07-07 08:30:40] phpbug at easihosting dot co dot uk

    What information do you require? I have read the guidelines, and I seem
    to have adeared to them, short, simple and not missing anything out.

    Did you not understand my bug report or do you think it is not a bug
    but a feature?

    Everytime I get a visitor to my site it sends me an email. It is
    reporting that they are visiting a different site to what they are.
    This other site is also hosted on the same server.

    I have not found a way to easily reproduce this, I just have to wait
    and read the emails that report both $_SERVER array and registered
    global variables.

    ------------------------------------------------------------------------

    [2003-07-06 17:50:44] phpbug at easihosting dot co dot uk

    Description:
    ------------
    When register_globals is on one would expect the registered globals to
    be the same values as the variables accessed through the global
    arrays.

    $remote_addr doesn't always return the IP of the visitor to the site
    but the IP of another visitor to another site on the same server.

    $server_name doesn't always return the host name for the site being
    visited, but that of another site being hosted on the same server.

    Reproduce code:
    ---------------
    echo '$SERVER_NAME';
    echo " ";
    echo "$SERVER_NAME";
    echo "<br>";

    echo '$_SERVER[SERVER_NAME]';
    echo " ";
    echo "$_SERVER[SERVER_NAME]";
    echo "<br>";


    Expected result:
    ----------------
    $SERVER_NAME [url]www.p800.co.uk[/url]
    $_SERVER[SERVER_NAME] [url]www.p800.co.uk[/url]

    Actual result:
    --------------
    $SERVER_NAME [url]www.p800.co.uk[/url]
    $_SERVER[SERVER_NAME] [url]www.symbos.co.uk[/url]


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=24515&edit=1[/url]

    sniper@php.net Guest

  2. Similar Questions and Discussions

    1. cgi.remote_addr problem
      I have a website that is IP restricted and being a nice person I have setup my own error message thats abit more user friendly. ...
    2. $ENV{'REMOTE_ADDR'}
      Dan Muey wrote: I'm no security expert, but how can these be spoofed? They don't come from the request headers, but are derived from the TCP...
    3. #24515 [Fbk->NoF]: $_SERVER[remote_addr] different to $remote_addr
      ID: 24515 Updated by: sniper@php.net Reported By: phpbug at easihosting dot co dot uk -Status: Feedback...
    4. #24515 [Fbk->Opn]: $_SERVER[remote_addr] different to $remote_addr
      ID: 24515 User updated by: phpbug at easihosting dot co dot uk Reported By: phpbug at easihosting dot co dot uk -Status: ...
    5. #24553 [NEW]: Error with $_SERVER["REMOTE_ADDR"]
      From: darren at aoitalk dot com Operating system: OSX 10.2.6 PHP version: 4.3.3RC1 PHP Bug Type: HTTP related Bug...
  3. #2

    Default #24515 [Opn->Fbk]: $_SERVER[remote_addr] different to $remote_addr

    ID: 24515
    Updated by: [email]sniper@php.net[/email]
    Reported By: phpbug at easihosting dot co dot uk
    -Status: Open
    +Status: Feedback
    Bug Type: Scripting Engine problem
    Operating System: linux
    PHP Version: 4.3.3RC1
    New Comment:

    Apache 1.3.6 ?!?! The latest and best version is Apache 1.3.27. There
    are couple of security bugs even in that version you use, UPGRADE it
    first! (also openssl!)

    Also, you use configure options you shouldn't be using:

    '--with-regex=system' <-- never use!
    '--enable-mm=shared' <-- it's "--with-mm" and it can't be shared.

    And these don't even exist:

    '--enable-track-vars'
    '--enable-mbstr-enc-trans'




    Previous Comments:
    ------------------------------------------------------------------------

    [2003-07-10 09:42:45] phpbug at easihosting dot co dot uk

    Configure:
    './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs'
    '--with-gettext=/usr' '--with-config-file-path=/etc/httpd'
    '--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes'
    '--with-regex=system' '--with-ttf' '--with-db' '--with-gdbm'
    '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-track-vars'
    '--with-gd' '--enable-wddx=shared' '--enable-mm=shared' '--enable-xml'
    '--enable-ftp' '--disable-debug' '--with-libdir=/usr/lib'
    '--with-pgsql=shared' '--with-pdflib=shared' '--with-jpeg-dir=/usr/lib'
    '--with-png-dir=/usr/lib' '--enable-inline-optimization'
    '--enable-gd-native-ttf' '--with-imap'

    Apache/1.3.6 (Unix) PHP/4.3.3RC2-dev mod_perl/1.21 mod_ssl/2.2.8
    OpenSSL/0.9.2b

    ------------------------------------------------------------------------

    [2003-07-09 18:14:21] [email]sniper@php.net[/email]

    Which webserver are you using?
    What was the configure line used?


    ------------------------------------------------------------------------

    [2003-07-07 08:30:40] phpbug at easihosting dot co dot uk

    What information do you require? I have read the guidelines, and I seem
    to have adeared to them, short, simple and not missing anything out.

    Did you not understand my bug report or do you think it is not a bug
    but a feature?

    Everytime I get a visitor to my site it sends me an email. It is
    reporting that they are visiting a different site to what they are.
    This other site is also hosted on the same server.

    I have not found a way to easily reproduce this, I just have to wait
    and read the emails that report both $_SERVER array and registered
    global variables.

    ------------------------------------------------------------------------

    [2003-07-06 17:50:44] phpbug at easihosting dot co dot uk

    Description:
    ------------
    When register_globals is on one would expect the registered globals to
    be the same values as the variables accessed through the global
    arrays.

    $remote_addr doesn't always return the IP of the visitor to the site
    but the IP of another visitor to another site on the same server.

    $server_name doesn't always return the host name for the site being
    visited, but that of another site being hosted on the same server.

    Reproduce code:
    ---------------
    echo '$SERVER_NAME';
    echo " ";
    echo "$SERVER_NAME";
    echo "<br>";

    echo '$_SERVER[SERVER_NAME]';
    echo " ";
    echo "$_SERVER[SERVER_NAME]";
    echo "<br>";


    Expected result:
    ----------------
    $SERVER_NAME [url]www.p800.co.uk[/url]
    $_SERVER[SERVER_NAME] [url]www.p800.co.uk[/url]

    Actual result:
    --------------
    $SERVER_NAME [url]www.p800.co.uk[/url]
    $_SERVER[SERVER_NAME] [url]www.symbos.co.uk[/url]


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=24515&edit=1[/url]

    sniper@php.net Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139