I don't know why it would matter, but you only have to
session_register("SESSION"); once. So put that line under the if statement
so that it is only run the first time they open the browser:
<?
session_start();
if (! isset($SESSION)) {
session_register("SESSION");
$SESSION["count"] = 0;
...
My theory is that it is registering the variable again thereby over-writing
whatever was there before...I don't know how valid this theory is, but it's
worth a try.
-----Original Message-----
From: Johannes Janson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 2:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] session, session AAAARGH
Sorry, still NOTHING. I really have NO idea
what could be the reason for this. It can't be any other
setting in the php.ini ?! ......
I have still NO idea at all what could have been the
reason for it but after copying the distributed php.ini
from php.net and changing the session.save_path it works.
Thanks again for the kind help. Now I can try to
figure out what went wrong.
Johannes
""Asendorf, John"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Here, try this little rework... it's a new one... because the last one was
> bad...
>
>
> <?
> session_start();
>
>
> if ( !isset($count)) {
> $count = 1;
> session_register("count");
> echo "<p>Counter initialized, please reload this page to see it
> increment</p>";
> } else {
> echo "<p>You have been to this page $count times during this
> session</p>";
> $count++;
> session_register("count");
> }
>
> ?>
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Aut insanit homo, aut versus facit
>
>
> > -----Original Message-----
> > From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 04, 2001 2:29 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] session, session AAAARGH
> >
> >
> > good point. never think you were NOT stupid
> > if something doesn't work cause usually you are.
> > But unfortunately in this case I still am stupid.
> > No, John it doesn't work. The strange thing is that
> > I'm being told that $PHPSESSID is a undefined
> > variable but in the ssession directory a file is generated
> > each time.
> >
> > I'll keep trying. Thanks john
> >
> > ""Asendorf, John"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I know this may sound stupid, but do you have a directory already
> > > established called C:\Programme\Apache
> > Group\Apache\cgi-bin\php4\sessiondata
> > >
> > > Maybe try making a fresh directory...
> > >
> > > ---------------------
> > > John Asendorf - [EMAIL PROTECTED]
> > > Web Applications Developer
> > > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > > Licking County, Ohio, USA
> > > 740-349-3631
> > > Aut insanit homo, aut versus facit
> > >
> > >
> > > > -----Original Message-----
> > > > From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, April 04, 2001 2:02 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] session, session AAAARGH
> > > >
> > > >
> > > > thanks John but nope, still the same...
> > > >
> > > > just some -maybe helpful- more info:
> > > > php.ini:
> > > > session.save_handler = files
> > > > session.save_path = C:\Programme\Apache
> > > > Group\Apache\cgi-bin\php4\sessiondata
> > > > session.use_cookies = 1
> > > > session.name = PHPSESSID
> > > >
> > > >
> > > > ""Asendorf, John"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > >
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > Don't forget session_destroy (); at some point...
> > > > >
> > > > > ---------------------
> > > > > John Asendorf - [EMAIL PROTECTED]
> > > > > Web Applications Developer
> > > > > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > > > > Licking County, Ohio, USA
> > > > > 740-349-3631
> > > > > Aut insanit homo, aut versus facit
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Wednesday, April 04, 2001 1:49 PM
> > > > > > To: Johannes Janson; Php-Windows (E-mail)
> > > > > > Subject: RE: [PHP-WIN] session, session AAAARGH
> > > > > >
> > > > > >
> > > > > > Try this little rework...
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > <?
> > > > > > session_start();
> > > > > >
> > > > > >
> > > > > > if ( !isset($count)) {
> > > > > > $count = 0;
> > > > > > session_register("count");
> > > > > > echo "<li>Counter initialized, please reload this
> > > > page to see it
> > > > > > increment";
> > > > > > } else {
> > > > > > echo "<li>Waking up session $PHPSESSID";
> > > > > > $count++;
> > > > > > session_register("count");
> > > > > > }
> > > > > > echo "<li>The counter is now $count ";
> > > > > > ?>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------
> > > > > > John Asendorf - [EMAIL PROTECTED]
> > > > > > Web Applications Developer
> > > > > > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > > > > > Licking County, Ohio, USA
> > > > > > 740-349-3631
> > > > > > Aut insanit homo, aut versus facit
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Johannes Janson [mailto:[EMAIL PROTECTED]]
> > > > > > > Sent: Wednesday, April 04, 2001 1:34 PM
> > > > > > > To: [EMAIL PROTECTED]
> > > > > > > Subject: [PHP-WIN] session, session AAAARGH
> > > > > > >
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I just figured out that my session-management is
> > > > > > > not working. I have a small, simple script to test
> > > > > > > this:
> > > > > > >
> > > > > > > <?
> > > > > > > session_start();
> > > > > > > session_register("SESSION");
> > > > > > >
> > > > > > > if (! isset($SESSION)) {
> > > > > > > $SESSION["count"] = 0;
> > > > > > > echo "<li>Counter initialized, please reload this
> > > > page to see it
> > > > > > > increment";
> > > > > > > } else {
> > > > > > > echo "<li>Waking up session $PHPSESSID";
> > > > > > > $SESSION["count"]++;
> > > > > > > }
> > > > > > > echo "<li>The counter is now $SESSION[count] ";
> > > > > > > ?>
> > > > > > >
> > > > > > > But the counter stays at "0". And in the specified
> > > > session.save_path
> > > > > > > directory I have a new file every time I reload the page.
> > > > > > >
> > > > > > > What is wrong??
> > > > > > >
> > > > > > > TIA
> > > > > > > johannes
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > > > > > To contact the list administrators, e-mail:
> > > > > > > [EMAIL PROTECTED]
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > > > > To contact the list administrators, e-mail:
> > > > > > [EMAIL PROTECTED]
> > > > > >
> > > > >
> > > > > --
> > > > > PHP Windows Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > > > [EMAIL PROTECTED]
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]