[PHP-DB] Warning message -- session side-effect

2004-08-27 Thread Worrawut Poonsuk
Hi, 
I found the warning message below when I open the webpage.
What am I do wrong with session variable?
Please help to comment... 

Thanks,
Wut

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

RE: [PHP-DB] Warning message -- session side-effect

2004-08-27 Thread Irm Jr
 I just came across this yesterday in fact.  If you look in your php.ini
file, you will see the following

; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit
register_globals
; is disabled.  PHP 4.3 and later will warn you, if this feature is
used.
; You can disable the feature and the warning seperately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.

session.bug_compat_42 = 0   //yours is likely set to 1
session.bug_compat_warn = 1

Hope this helps.



-Original Message-
From: Matt M. [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 27, 2004 5:43 AM
To: Worrawut Poonsuk
Cc: PHP DB List
Subject: Re: [PHP-DB] Warning message -- session side-effect

 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

you have any code examples.  Try looking into using the $_SESSION array.

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php