[SOLVED] session not passing...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

[SOLVED] session not passing...

Post by Illusionist »

I'm using sessions on my page and i've just noticed that when i use JavaScript to open a new window, the session doesn't pass through. Does anyone know how I can pass the session to a new page??
Last edited by Illusionist on Tue Jun 22, 2004 10:29 pm, edited 1 time in total.
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

try useing SID in the url? i never had this problem my self though.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Thats the weird thing! This hasn't ever happened to me before either, until now :?:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it may be a problem of when and how you are asking the javascript window to open..
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

where is the page your opening? in the same dir? or another? that might cos of it...might wanna check for session_start(); at the top of the page aswell....it can happen to anyone :P
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

I have the open window in a function and then i call it :

Code: Select all

<a href="javascript:open()">
And this is the way i've done it before and it worked... But now it isn't :?
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Its the same page... I open the same page in another window, but displaying different information... And the sessions work fine on the normal page.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Could there be a setting in php.ini that would control this??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

what are your session cookie settings, the url of the "normal" page, and popup page used?
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

:D cookie lifetime was 0! i changed to 999 and it works great now! lol thanks feyd!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

solved-ish :?

you don't need to edit your post.. we have a button for it :)
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Am I blind? Because i can't seem to find the button! Or is it just for mods? hehe :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Only with the powers of gods, er mods. :P
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

ahh! :roll: ok ok!
Post Reply