refiking Posted April 21, 2008 Share Posted April 21, 2008 I don't get it. The script ran just fine. Here is the message that posted after the script ran and returned what I requested: 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 How can I resolve this? Link to comment https://forums.phpfreaks.com/topic/102131-got-error-message-about-sessions/ Share on other sites More sharing options...
jonsjava Posted April 21, 2008 Share Posted April 21, 2008 Looks like a global issue. Globals is going away (or so the rumor goes), so it is best to not use them in your code. Link to comment https://forums.phpfreaks.com/topic/102131-got-error-message-about-sessions/#findComment-522781 Share on other sites More sharing options...
PFMaBiSmAd Posted April 21, 2008 Share Posted April 21, 2008 Like the error message states, this is a bug in php. When you have a program variable with the same name as a session variable and you set the program variable to either zero or null (I don't remember which off of the top of my head), some of the bug riddled register globals code (even when register globals are off) wants to create and populate the session variable with the same name. The warning message that is generated is triggered at the point that the code would have set the session variable if register globals are on. You can either turn off the warning (like the error message states) or use unique names for program variables and session variables. Link to comment https://forums.phpfreaks.com/topic/102131-got-error-message-about-sessions/#findComment-522783 Share on other sites More sharing options...
craygo Posted April 21, 2008 Share Posted April 21, 2008 You may want to post some code also to try and help you out. Ray Link to comment https://forums.phpfreaks.com/topic/102131-got-error-message-about-sessions/#findComment-522784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.