View Full Version : $session['sessionurl'] no value in showthread.php - why?
Spinball
04-22-2005, 04:38 PM
Folks,
I'm trying to pass the current session over to an external script near the end of showthread.php but $session['sessionurl'] has no value. Which is odd because it is used all over the place and I thought it always had a value. Any idea why not?
Thanks.
Marco van Herwaarden
04-22-2005, 06:46 PM
Did you make $session a global? Can you access other $session variables?
Spinball
04-22-2005, 07:05 PM
Thanks MarcoH64,
this is a slight modification to showthread.php just before the
// ################################################## ###########################
// output page
bit at the bottom. I would have thought that the session variable would already be populated since it's being used elsewhere in the script.
I tried [sessionhash] aswell but that was empty, too.
Marco van Herwaarden
04-22-2005, 07:21 PM
$session['sessionurl'] only holds a value if you are not using cookies i think. Same goes for the other $session elements if i am not mistaken.
You are either using cookies, or $session.
Spinball
04-25-2005, 08:07 AM
Ah ok, Marco, so do you know how I can pass session information to an external script, please?
trying using $_SERVER['REQUEST_URI']?
Ah ok, Marco, so do you know how I can pass session information to an external script, please?
one question on that, do you need it to be secure?
Marco van Herwaarden
04-26-2005, 03:39 AM
You should never trust any information that comes from outside a script. Always validate it before using.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.