Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17723

Re: PHP sessions

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: PHP sessions
Date 2018-05-06 12:51 +0200
Organization solani.org
Message-ID <pcmmoc$b4p$1@solani.org> (permalink)
References <pcmdpu$2ek$1@dont-email.me>

Show all headers | View raw


On 06.05.2018 at 10:19, madwomans Dad wrote:

> I'm very familiar with Java and I'm trying to compare PHP session
> handling with J2EE session handling and I've come up with a bit of a
> problem.
> 
> I get the following output
> step1 - check session -
> there is no session
> starting session
> session started
> there is an active session
> 
> if I then enable the redirect to step2.php
> 
> I would expect to see "there is an active session" but what I get is
> 
> step2 - check session -
> there is no session
> 
> Huh! what am I missing

You have to start the session for each request, since PHP closes
sessions automatically at the end of the request.

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PHP sessions madwomans Dad <dsvirtual58@gmail.com> - 2018-05-06 09:19 +0100
  Re: PHP sessions "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-05-06 12:51 +0200
    Re: PHP sessions madwomans Dad <dsvirtual58@gmail.com> - 2018-05-06 12:59 +0100
      Re: PHP sessions "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-05-06 14:11 +0200
      Re: PHP sessions Gregor Kofler <usenet@gregorkofler.com> - 2018-05-06 14:13 +0200
        Re: PHP sessions madwomans Dad <dsvirtual58@gmail.com> - 2018-05-06 14:08 +0100
          Re: PHP sessions "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-05-06 15:22 +0200
            Re: PHP sessions madwomans Dad <dsvirtual58@gmail.com> - 2018-05-06 16:01 +0100
              Re: PHP sessions "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-05-06 17:27 +0200
                Re: PHP sessions madwomans Dad <dsvirtual58@gmail.com> - 2018-05-06 19:17 +0100
      Re: PHP sessions "J.O. Aho" <user@example.net> - 2018-05-06 18:57 +0200
  Re: PHP sessions Richard Damon <Richard@Damon-Family.org> - 2018-05-06 13:21 -0400

csiph-web