Guest Posted September 15, 2005 Share Posted September 15, 2005 I am on a shared server environment where registered globals are turned off. I am getting this error throughout my oscommerce site, how can i disable this warning message? Warning: 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 /home/cust1/user1157414/html/catalog/includes/functions/sessions.php on line 197 Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 I cant set setting session.bug_compat_42 or session.bug_compat_warn to OFF. That is controlled by the PHP.ini file which i do not have access to. I read about setting up an .htaccess with those settings but I cant get it to work. Link to comment Share on other sites More sharing options...
♥Vger Posted September 15, 2005 Share Posted September 15, 2005 Well, there's something wrong with the error message, because the osCommerce sessions.php file only has 142 lines so there can't be an error on line 197. It's worth checking if you have a local php.ini file. FTP to your site and delve down, looking for an 'etc' folder. If there's a local php.ini file it'll likely be in that folder. Have you installed the Register Globals Patch Files? If all else fails you can disable all error messages (though not recommended) in includes/application_top.php by commenting out the second line of this: // set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); Vger Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 I dont believe I have installed the RG patch files. What do they do, what is their function? Link to comment Share on other sites More sharing options...
♥Vger Posted September 15, 2005 Share Posted September 15, 2005 It looked, from the error message you posted, as if Register Globals was set to 'Off' in php.ini - but if that was the case your whole site should be down witout the patch installed. You really need to find out from your hosting company if Register Globals is enabled. If it's not you'll need to install the Register Globals Patch Files for your site to operate properly. However, you can't add the patch files if Register Globals is set to 'On' - which is why you need to find out that info from your hosts. Vger Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 No I dont have a local php.ini file that I have access to on my shared server. My sessions.php has 262 lines of code. v 1.19 that came with OsCommerce v2.2 /* $Id: sessions.php,v 1.19 2003/07/02 22:10:34 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 It looked, from the error message you posted, as if Register Globals was set to 'Off' in php.ini - but if that was the case your whole site should be down witout the patch installed. You really need to find out from your hosting company if Register Globals is enabled. If it's not you'll need to install the Register Globals Patch Files for your site to operate properly. However, you can't add the patch files if Register Globals is set to 'On' - which is why you need to find out that info from your hosts. Vger <{POST_SNAPBACK}> Registered globals are OFF as a security measure. I know this for a fact, i spoke to their techs a few weeks ago. I must have installed a patch or something, but cant recall. I thought it was a swtich in the config files that disabled registered globals. I cant remember tho. Link to comment Share on other sites More sharing options...
♥Vger Posted September 15, 2005 Share Posted September 15, 2005 You need to download the osCommerce 2.2 MS2 zip file from downloads at www.oscommerce.com, unzip it on your computer and locate that file. You'll see that it only has (or should only have) 142 lines. Vger Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 Ok it looks like i've already installed your package. My bad.... However I did not apply this fix, and just did....seems to have eliminated the error message. // Unmap global from session variable (note that the global variable keeps the value of // the session variable. This should be unnecessary but it reflects the same behaviour // as having register_globals enabled, so in case the OSC code assumes this behaviour, // it is reproduced here $nothing; IS CHANGED TO: // Unmap global from session variable (note that the global variable keeps the value of // the session variable. This should be unnecessary but it reflects the same behaviour // as having register_globals enabled, so in case the OSC code assumes this behaviour, // it is reproduced here $nothing = 0; Link to comment Share on other sites More sharing options...
Guest Posted September 15, 2005 Share Posted September 15, 2005 Weird, the error is back again. What gives? :'( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.