register_globals

Issue #106 resolved
Former user created an issue

Originally reported on Google Code with ID 106 ``` Problem:

The browser shows only the message: "It appears that the PHP directive, 'register_globals' is enabled. This is bad. You need to disable it before continuing."

Background:

I have installed it on my web server, which is running PHP 5.3 as follows: php -v returns: PHP 5.3.13-nmm1 with Suhosin-Patch (cli) (built: May 9 2012 12:59:42) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd.

Solution:

Replace the following line "if(ini_get("register_globals")) check whether register_globals is turned on - if it is, we need to not continue "

with the following "if(ini_get("register_globals") != "off") check whether register_globals is turned on - if it is, we need to not continue "

Explanation:

ini_get("register_globals") returns "off" instead of false in PHP 5.3 ```

Reported by `kagan314` on 2012-05-24 22:41:39

Comments (4)

  1. Christopher Kramer

    ``` Thanks for reporting this issue. I just fixed it in SVN. Please try using the current SVN revision #210 to see if this fixes the issue for you: http://phpliteadmin.googlecode.com/svn/source/1.9.3/phpliteadmin.php

    Your fix did cause problems with my PHP version 5.3.8 on Windows. For me, your fix caused this problem (which was not there before). I consider the condition should be the other way round:

    if(ini_get("register_globals") == "on" || ini_get("register_globals")=="1")

    This should avoid any false positive detection of register_globals.

    I tried it with both register_globals enabled and disabled and it detected correctly in both cases. Please let me know whether this is true for you as well.

    Greetings! Christopher ```

    Reported by `crazy4chrissi` on 2012-06-01 20:38:24 - Status changed: `Started`

  2. Former user Account Deleted

    ``` Dear Christopher, I have tested your fix on my mac and it works for me. Thanks!

    Kagan ```

    Reported by `kagan314` on 2012-06-04 20:12:17

  3. Christopher Kramer

    ``` Dear Kagan,

    thanks for verifying my fix.

    Greetings! Christopher ```

    Reported by `crazy4chrissi` on 2012-06-04 21:35:19 - Status changed: `Verified`

  4. Log in to comment