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


Groups > comp.lang.php > #4805

Re: session array not available in popup?

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: session array not available in popup?
Date 2012-02-13 21:12 +0100
Message-ID <9pt94sFuf8U1@mid.individual.net> (permalink)
References <68e1d7a7-3a12-4cb4-b43e-b96f3d5a14ca@qt7g2000pbc.googlegroups.com> <jhbodh$h6d$1@dont-email.me> <4b3bba57-105b-4618-8be7-3fd8e15e5c47@m3g2000pbi.googlegroups.com>

Show all headers | View raw


cerr wrote:
> On Feb 13, 11:30 am, Jerry Stuckle<jstuck...@attglobal.net>  wrote:
>> On 2/13/2012 2:21 PM, cerr wrote:

>>> <?php
>>> session_start();
>>> var_dump($_SESSION);
>>> ?>
>>> at the top of my popup script just prints
>>> array(0) { }
>>> and this is what the session dumps on the page from where I open the
>>> popup:
>>> string(2) "10"

If you have used

$_SESSION = "10";

then you haven't used the session as it's intended to work, try instead:

$_SESSION['integer'] = 10;


>> Is the popup accessing the same domain as the main window?
>
> Yes, they're both on the same domain, different directories tho but
> that shouldn't matter, would it?

Depends on your session.cookie_path

See: http://www.php.net/manual/en/function.session-set-cookie-params.php
http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-path

OT: Please remove things that you don't reply at, like signatures.


-- 

   //Aho

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


Thread

session array not available in popup? cerr <ron.eggler@gmail.com> - 2012-02-13 11:21 -0800
  Re: session array not available in popup? Jerry Stuckle <jstucklex@attglobal.net> - 2012-02-13 14:30 -0500
    Re: session array not available in popup? cerr <ron.eggler@gmail.com> - 2012-02-13 11:37 -0800
      Re: session array not available in popup? cerr <ron.eggler@gmail.com> - 2012-02-13 12:04 -0800
      Re: session array not available in popup? "J.O. Aho" <user@example.net> - 2012-02-13 21:12 +0100
        Re: session array not available in popup? cerr <ron.eggler@gmail.com> - 2012-02-13 12:53 -0800
          Re: session array not available in popup? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-13 22:15 +0000
            Re: session array not available in popup? Michael Fesser <netizen@gmx.de> - 2012-02-14 00:45 +0100
              Re: session array not available in popup? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-14 11:59 +0000
                Re: session array not available in popup? cerr <ron.eggler@gmail.com> - 2012-02-14 10:30 -0800
          Re: session array not available in popup? Michael Fesser <netizen@gmx.de> - 2012-02-14 00:59 +0100
            Re: session array not available in popup? cerr <ron.eggler@gmail.com> - 2012-02-14 10:33 -0800
  Re: session array not available in popup? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-02-15 18:34 +0100

csiph-web