Warning regarding session side-effect : puzzle
- From: trookat <trookat@xxxxxxxxxxx>
- Date: Sun, 16 Nov 2008 18:40:36 +0900
I have been working with php on and off for a while and I have just come across a warning that i haven't seen before
I am using php5 . the warning in question is
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
i'm just mucking about with some new login stuff using sessions and it all works just fine i decided to update the password in my sqlite db using
$pass=md5('dude');
$system->sqldb->queryExec("UPDATE users SET username='trookat', user_password='$pass' WHERE username='admin'");
i noticed the warning at the end of html .
i commented the sql line out and still got the warning
I renamed the $pass to $passs and the warning vanished ,
note Globals is turned off . Not once i have used $pass in the other code ,
the only reference i have to a pass is in a session var ( thats going to be renamed anyway)
I am assuming that because i have a session with a 'pass' var ( which is always checked with $_SESSION['pass'] ) and i used $pass as a var its caused this error
what i want to know is why the warning? i am assigning a value to $pass, its not like am trying to do a conditional check on it.
Anyone have answers the why? how do i make sure these warnings don't come up on servers that don't have setting session.bug_compat_42 or session.bug_compat_warn set to off. ( other then errorlevel setting? )
Thanks for you time
- trookat
.
- Follow-Ups:
- Re: Warning regarding session side-effect : puzzle
- From: Janwillem Borleffs
- Re: Warning regarding session side-effect : puzzle
- From: FutureShock
- Re: Warning regarding session side-effect : puzzle
- Prev by Date: Re: How to manage date fields in template
- Next by Date: Re: How To...
- Previous by thread: result of a function inner one other
- Next by thread: Re: Warning regarding session side-effect : puzzle
- Index(es):
Relevant Pages
|