Page 1 of 1

how to solve warning in session function

Posted: Thu Jun 16, 2005 9:05 am
by unix77
Hi all

I got warning problem while using session function
Warning: Unknown(): 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 Unknown on line 0
Can any one explain to me how to solve this problem? i have try to set session.bug_compac_42 = 1 and sesion_bug_compag_warn = 0 in php.ini (C:/winnt/php.ini)

Posted: Sat Jun 18, 2005 10:31 am
by dreamline
Can't help you there, i'm using version 4 of PHP for quite some time but haven't had any problems that you just mentioned.... :)

Posted: Sat Jun 18, 2005 1:12 pm
by wwwapu
The big Manual on function session_register() wrote: If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled.