RESOLVED, sort of -- Re: [PHP] where is my session data on my new server?
| From: | David T-G | Date: | Fri, 17 Oct 2003 17:56:26 +0000 |
| Subject: | RESOLVED, sort of -- Re: [PHP] where is my session data on my new server? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166513@lists.php.net to get a copy of this message | ||
Hi, all --
It appears that the change from 4.2.3 to 4.3.4rc1 was not something that
got broken but instead something that got fixed. Oh, yay. But what do I
do now? Hmmm...
The code
<?php
session_name('name') ;
session_start ;
session_register('pw') ;
$pwc = "realpass" ;
if ( $pw != $pwc )
{
if ( $pw != "" )
{
print "Invalid password!<br>\n" ;
session_unregister('pw') ;
}
print "<form method='post'>\n" ;
print "Password:<br><input teyp='password'
name='pw'><br>\n" ;
print "<input type='submit'
value='ENTER'>\n</form>\n" ;
session_write_close() ;
exit ;
}
// protected page body here
?>
used to work but now does not, apparently because now one cannot register
a session variable unless a regular var of the same name has already been
defined. That is,
<?php
if ( $_GET['stop'] )
{
session_start() ;
print "pw is .$pw.\n" ;
exit ;
}
$pw = "pass" ;
session_register('pw') ;
header("Location: ?stop=1") ;
?>
*does* work. Of course, I have to turn my code inside out or worse to do
this (I don't really know where I'm going to go, either; that code is a
direct copy of an example shown to me, so I don't yet see how to turn my
code inside out to match it).
I still don't know what the bug was or how it was fixed or if I can
return to the old behavior (which certainly would put me back in business
quickly and let me fix all of my code on a reasonable schedule), but at
least I think I have it pinned down to 1) not a mis-setting in php.ini
and 2) probably not something I can "fix" quickly.
If, based on this, anyone has any more info or pointers, I sure would
love them :-)
Thanks & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!