Jump to content

[SOLVED] Register Gloabals


scottybwoy

Recommended Posts

Hi I know Register Globals is a no no.  However I am using OsCommerce, which is an open source e-commerce site.  Unfortunately it uses register globals.  This is not my issue though.  On my localhost Apache server, php v4.4.8 keeps Warning me :

 

session_write_close() [function.session-write-close]: 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 C:\Apache\Apache2\htdocs\klickshopping\includes\functions\sessions.php on line 106

 

Concerning this function :

 

<?php

  function tep_session_close() {
    if (PHP_VERSION >= '4.0.4') {
      return session_write_close();    // Line 106
    } elseif (function_exists('session_close')) {
      return session_close();
    }
  }

?>

 

In my php.ini register globals is set to ON, but I think this is cocking up my navigation as it can't seem to find the files in the url.  (I am using a SEO URL mod) so would like to keep the code as is for the time being.  Anyone have any pointers / solutions.  Thanks for you time ;)

Link to comment
Share on other sites

Lol, thanks.  I posted there too, but I think this forum is much better.  If that error is just the OsCommerce message,  Surely there is a deeper explanation.  I have checked all those settings, but the message just won't go.  My .htaccess file does not interfere.  Any other ideas, or is it really incomprehensable unless you understand how OsCommerce works?

 

Thanks anyway.

Link to comment
Share on other sites

At the moment they are both ON,  I have had them off before though at it didn't seem to make much difference.

 

Funny thing is that they are ON for local level and master level, when in my .htaccess file I have :

 

<IfModule mod_php4.c>
  php_value session.use_trans_sid		0
  php_value register_globals			1
  php_value magic_quotes_gpc	      	0
  php_value session.auto_start		0
</IfModule>

 

Does this mean that my apache is not configured correctly?

Link to comment
Share on other sites

I have noticed that whether the directive is set in php.ini or not, it doesn't matter.  Searching all the files in my web directory for ini_set( returns 6 entries, none of them including session.bug_compat_42 or session.bug_compat_warn.

 

Also the mod file that apache uses is c:/php448/php4apache2.dll is that what should be in my .htaccess?

 

Thanks.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.