Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help!Warning:session_write_close() [function.session-write-close]: Your script possibly relies on a session side-effect which existed until PHP 4.2.3.


jamartin

Recommended Posts

Posted

Hi to everyone.

 

I need some help with this.

 

Recently, my web host company update something on the servers. This caused that a Warning message is being generated.

Do you have any idea to solve it?.

 

This warning message is being printed after the footer in all my pages:

 

Warning: 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 /home/hotshopc/public_html/includes/functions/session.php on line 153

 

The line 153 is the call to the session_write_close() function in:

 

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

 

The hosting company has disabled the php_value flag on the .htaccess file and the ini_set() function, so I can not use them to enable register_globals on.

 

Please, I need one of the following:

 

- A mod or contribution that solves this problem.

- That someone explain me exactly what register_globals is, so i could figure some fix for this. (I tried to read on some other sites about the register_globals, but don't understand it yet).

 

Any kind of help is greatly appreciated.

 

Thanks a lot in advance.

 

Regards,

Hey!!... I still need help with this http://www.oscommerce.com/forums/index.php?showtopic=309208. Please, take a look on it.

  • 6 months later...
Posted
I have the same problem of live. Please help we..

Probably this error will go away if you replace catalog/includes/functions/sessions.php and admin/includes/functions/sessions.php with the ones found in the osCommerce 2.2RC2a download.

Keep a backup of the old ones just in case.

  • 3 months later...
Posted

I finally solve my problem by adding an "@" on both session.php files at line 153

 

 

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

  • 5 months later...
Posted

Probably this error will go away if you replace catalog/includes/functions/sessions.php and admin/includes/functions/sessions.php with the ones found in the osCommerce 2.2RC2a download.

Keep a backup of the old ones just in case.

 

It works for me ! Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...