Jump to content

Got Error Message About Sessions


refiking

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.