Menu

#2364 (ok 2.10.0-rc2) Undefined PHP_SELF in server_status.php

Latest_Git
fixed
1
2013-06-11
2007-02-22
Xuefer
No

Notice: Undefined variable: PHP_SELF in /www/htdocs/phpMyAdmin/server_status.php on line 266

Notice: Undefined variable: PHP_SELF in /www/htdocs/phpMyAdmin/server_status.php on line 281
...

i'm using trunk/phpMyAdmin/

php:
error_reporting = E_ALL
PHP 4.4.5-dev (cgi-fcgi) (built: Nov 18 2006 18:20:08)

i wonder what other info i need to write down here..

Discussion

  • Jürgen Wind

    Jürgen Wind - 2007-02-22

    Logged In: YES
    user_id=1383652
    Originator: NO

    yes,
    I always use $_SERVER['PHP_SELF'] instead in my own scripts
    as i noticed that in some PHP installations $PHP_SELF is not set by default.

     
  • Marc Delisle

    Marc Delisle - 2007-02-22
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-02-22

    Logged In: YES
    user_id=210714
    Originator: NO

    $PHP_SELF should have been globalized by libraries/grab_globals.lib.php:

    $server_vars = array('PHP_SELF', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_AUTHORIZATION');
    foreach ($server_vars as $current) {
    // its not important HOW we detect html tags
    // its more important to prevent XSS
    // so its not important if we result in an invalid string,
    // its even better than a XSS capable string
    if (PMA_getenv($current) && false === strpos(PMA_getenv($current), '<')) {
    $$current = PMA_getenv($current);
    // already importet by register_globals?
    } elseif (! isset($$current) || false !== strpos($$current, '<')) {
    $$current = '';
    }
    }
    --------
    could you have a look at this code and see what happens at your site?

     
  • Marc Delisle

    Marc Delisle - 2007-02-25

    Logged In: YES
    user_id=210714
    Originator: NO

    Sorry, problem confirmed.

     
  • Marc Delisle

    Marc Delisle - 2007-02-25
    • priority: 5 --> 1
    • summary: Undefined variable: PHP_SELF in server_status.php --> (ok 2.10.0-rc2) Undefined PHP_SELF in server_status.php
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-02-25

    Logged In: YES
    user_id=210714
    Originator: NO

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2007-02-28
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed