Yrewol Posted April 1, 2007 Posted April 1, 2007 I get the following error on my website: 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/httpd/vhosts/MySite.com.com/httpdocs/includes/functions/sessions.php on line 197 This is what the line in refrence contains. 194. // <<< END REGISTER_GLOBALS 195. 196. if (PHP_VERSION >= '4.0.4') { 197. session_write_close(); 198. } elseif (function_exists('session_close')) { 199. session_close(); 200. } 201. } 202. 203. function tep_session_destroy() { 204. // >>> BEGIN REGISTER_GLOBALS 205. // Work-around to allow disabling of register_gloabls - unmap all defined 206. // session variables 207. if (count($_SESSION)) 208. { 209. $session_keys = array_keys($_SESSION); 210. foreach($session_keys as $variable) 211. { 212. link_session_variable($variable, false); 213. unset($_SESSION[$variable]); 214. } 215. } 216. // <<< END REGISTER_GLOBALS What do I have to change to turn off this error message? Thanks,
hejhog Posted June 7, 2007 Posted June 7, 2007 Until a better fix is provided to suppress the error message change session_write_close() to @session_write_close(). The @ symbol will suppress any errors.
big cod Posted July 3, 2007 Posted July 3, 2007 Until a better fix is provided to suppress the error message change session_write_close() to @session_write_close(). The @ symbol will suppress any errors. Does doing this cause any side effects ?
dynamoeffects Posted July 3, 2007 Posted July 3, 2007 Other than not seeing the error, no. Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.
hejhog Posted July 10, 2007 Posted July 10, 2007 Hello, Just an update for anyone suffering from this. I believe this problem is a result of using a shared SSL from my web host. The swapping of servers causes problems with session data. Have since swapped hosting to a dedicated IP and Private SSL the site works a dream. In fact I would highly recommend this approach (dedicated IP / private SSL) to anyone setting up a oscommerce site as it will save you hours of chasing your own tail. I am significantly balder from trying to get a shared ssl to work!!!! Hope this helps to save you hours of grief. Many Thanks, Shaun
Recommended Posts
Archived
This topic is now archived and is closed to further replies.