Re: Sessions broken
| From: | Thies C. Arntzen | Date: | Sun, 16 Jan 2000 14:34:41 +0000 |
| Subject: | Re: Sessions broken | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-14678@lists.php.net to get a copy of this message | ||
update you cvs.
On Sun, 16 Jan 2000, Stanislav Malyshev wrote:
> Followup to locking problem with sessions - seems that sessions are not
> finalized when exit() is called - i.e., problem is not in sessions but in
> exit(). It also doesn't store sessions variables on exit - here is a
> script that illustrates it:
>
> <?php
>
> session_name("Foo");
>
> function start() {
> global $count;
> session_start();
> thaw();
> }
>
> function thaw() {
> session_register("count");
> global $count;
> print "Thawed: $count<br>";
> }
>
> function freeze() {
> global $count;
> session_register("count");
> print "Frozen: $count<br>";
> exit();
> }
>
> start();
> $count++;
> print "Counting: $count<br>";
> freeze();
> ?>
>
>
> This doesn't increment stored count, unless I remove exit(). Needless to
> say, current behaviour breaks any script that relies on sesssions fatally.
>
> --
> Stanislav Malyshev stas@zend.com
> +972-3-6139665
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany