scottybwoy Posted June 24, 2008 Share Posted June 24, 2008 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 Quote Link to comment Share on other sites More sharing options...
scottybwoy Posted June 24, 2008 Author Share Posted June 24, 2008 bump Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 24, 2008 Share Posted June 24, 2008 You may get more response if you post on the OsComerce Support Forum Ken Quote Link to comment Share on other sites More sharing options...
scottybwoy Posted June 24, 2008 Author Share Posted June 24, 2008 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. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 24, 2008 Share Posted June 24, 2008 What values do a phpinfo(); statement show for session.bug_compat_42 and session.bug_compat_warn? Quote Link to comment Share on other sites More sharing options...
scottybwoy Posted June 25, 2008 Author Share Posted June 25, 2008 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? Quote Link to comment Share on other sites More sharing options...
scottybwoy Posted June 25, 2008 Author Share Posted June 25, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.