Re: register_globals and sessions

From: Date: Thu, 26 Nov 2009 20:20:02 +0000
Subject: Re: register_globals and sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-300128@lists.php.net to get a copy of this message
On Wed, Nov 25, 2009 at 3:01 PM, Allen McCabe <allenmccabe@gmail.com> wrote: > *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* It sounds like you're trying to use $_SESSION without having a session_start() call first. > I have Googled this extensively, and the solutions other people tried > (turning off the warning) don't work for me; I don't have permission to my > PHP settings (currently working on a free-hosted site). There are many settings that can be changed using the function ini_set (http://php.net/ini_set) and display_errors is one of them. That said, it is always best to fix stuff like this than just hiding it. When you just hide errors/warnings/notices things don't always work reliably. HTH, Brady

« previous php.general (#300128) next »