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


Groups > comp.lang.php > #17727

Re: PHP sessions

From madwomans Dad <dsvirtual58@gmail.com>
Newsgroups comp.lang.php
Subject Re: PHP sessions
Date 2018-05-06 14:08 +0100
Organization A noiseless patient Spider
Message-ID <pcmunn$j5s$1@dont-email.me> (permalink)
References <pcmdpu$2ek$1@dont-email.me> <pcmmoc$b4p$1@solani.org> <pcmqnr$n17$1@dont-email.me> <pcmrhu$t5l$1@dont-email.me>

Show all headers | View raw


On 06/05/2018 13:13, Gregor Kofler wrote:
> Am 2018-05-06 um 13:59 schrieb madwomans Dad:
>> On 06/05/2018 11:51, Christoph M. Becker wrote:
>>> 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.
>>>
>> I clicked reply. I should have clicked follow up. Apologies to C M B
>>
>> Anyway
>>
>> What the heck is the point of a session object that closes automatically
>> at the end of a request? The whole point of a session is that it stays
>> active for a particular sequence of requests or a users 'session' on  a
>> particular web site.
>>
>> This makes no sense at all. There must be way to track a session in PHP.
>>
>> Go on, what's the secret.
> 
> To read the manual?
> 
> http://php.net/manual/en/function.session-start.php
> 
> says
> "session_start — Start new or *resume* existing session"
> 
> If you care to read the few paragraphs on the aforementioned page you
> will understand how sessions are handled. It's quite easy.
> 
> Gregor
> 
> 
Thunderbird is driving me nuts.

I meant to say to the ng

It's pointlessly complicated and a very poor abstraction of a user 
session. I wish I didn't have to use PHP. Life is just too short for 
this crap.

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