how to solve warning in session function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
unix77
Forum Newbie
Posts: 7
Joined: Tue Jun 07, 2005 6:13 am
Location: south korea

how to solve warning in session function

Post 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)
dreamline
Forum Contributor
Posts: 158
Joined: Fri May 28, 2004 2:37 am

Post 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.... :)
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post 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.
Post Reply