Re: [PHP3] Sessions won't work
| From: | fredo | Date: | Mon, 12 Jun 2000 16:40:33 +0000 |
| Subject: | Re: [PHP3] Sessions won't work | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1631@lists.php.net to get a copy of this message | ||
Make all session variables GLOBAL and set register_globals = On in php.ini,
this fixes it for me. I find it weird, but seems this is only way for
now....
"John Watzke" <watzkej_php@hotmail.com> wrote in message
news:20000612135826.48796.qmail@hotmail.com...
> Hi all,
>
> I have been try to get sessions to work but they don't work quite
right.
> I am using the sample session script:
>
> <?
> session_start();
> $counter++;
> print($counter);
> session_register("counter");
> ?>
> <A HREF="test.php?<?echo SID;?>">link</A>
>
> When I load the page the first time, $counter is set to 1 and the
script
> prints "1link". The link is set to, lets say,
>
> http://test4/test.php?PHPSESSID=d290e54000332e2a9503300fb1cc5c46.
> When I
> click the link, what the link was set to is displayed in the browser's
> location window. However, the page still has "1link" and the link is now
> set to a different session id. When I click the link again, the script
> prints "2link". I click again and it prints "3link" and so on but now the
> session id is the same each time around. The session never sets the first
> time around. I always have to click the link to make the session stick.
>
> Here are my build params:
> ./configure --with-apache=../apache_1.3.12 --without-mysql
> --enable-track-vars --without-xml --disable-bcmath --disable-debug
>
> And here is a look at the session configuration:
>
> session.save_path /tmp /tmp
> session.name PHPSESSID PHPSESSID
> session.save_handler files files
> session.auto_start 0 0
> session.gc_probability 10 10
> session.gc_maxlifetime 1440 1440
> session.serialize_handler php php
> session.cookie_lifetime 0 0
> session.cookie_path / /
> session.cookie_domain no value no value
> session.use_cookies 0 0
> session.referer_check 0 0
> session.entropy_file no value no value
> session.entropy_length 0 0
> session.cache_limiter nocache nocache
> session.cache_expire 180 180
>
> The system is AIX 4.3.2 with Apache 1.3.12 and PHP 4.0.0.
>
> Thanks,
>
> John Watzke
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe@lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe@lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>