Menu

Problem with Register Globals turned off

Help
2006-08-10
2013-05-28
  • Sue Crocker

    Sue Crocker - 2006-08-10

    My system has register globals turned off.

    I don't have access to the php.ini to change it. So when I go to the site, I see the following error message:

    Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0

    OK... so how to I get around this?

     
    • Matthias Steffens

      Hi Sue,

      which PHP version are you using? AFAIK, this message doesn't occur with recent versions of PHP.

      You should be able to use refbase independent from the Register Globals setting, i.e., refbase should work correctly no matter whether Register Globals is turned on or off.

      Some time ago, there was one user who had a similar problem. He could fix his problem by inserting following two lines:

      ini_set('session.bug_compat_42','off');
      ini_set('session.bug_compat_warn','off');

      before the call to the 'session_start()' function within function 'start_session()' in file 'includes/include.inc.php'.

      Hope that helps, Matthias

       
    • Sue Crocker

      Sue Crocker - 2006-08-14

      That fixed it, thanks.

       

Log in to post a comment.