You have cookies disabled and session.use_trans_sid is enabled in php.ini. So the session module parses your html output and adds PHPSESSID to all internal links, forms and everything else that is needed. However it does not add session id to Location header, it is your responsibility. Use header('Location: details.php?'.SID); SID is a magic constant that contains '&'.session_name().'='.session_id() (thus you need ? after details.php).

PHPSESSID is here so session module knows which session file to use. If you look into your /tmp (or whatever is set up) directory, a file named sess_46081aa70da693f5edeecc069ed8a627 will be sitting there with all session variables.

Ryan A wrote:

Hi,
Ok, have half solved why my scripts all of a sudden stopped working.

This is how my scripts are setup:
There is a form(login.php) where the user puts in his user/pass, then this
is authenticated(auth.php) by the database and a few other sessions are
created (email,cust_number) and also username,password sessions are created.
Then i am using a header("Location....") to send it to details.php,
details.php will check and make sure that the following sessions have been
created username,password,email,cust_number, if any are not valid it will
kick ther person back to login.php...this was working before but not now.

I went to my forms source and checked where it was sending my submitted form
and found a hidden text box there with this data:
<input type="hidden" name="PHPSESSID"
value="46081aa70da693f5edeecc069ed8a627" />

so i took that "PHPSESSID" and its value and added it to my
header("Location....") like so:
header("Location:details.php?PHPSESSID=46081aa70da693f5edeecc069ed8a627")

and every damn thing is working again...

can ANYBODY please tell me what the @#%# is that PHPSESSID, how it got into
my login page and how do i work with it?
because now I have manually put it in my file, do i need to always put it?
how do i get it as a variable and finally how can i take it out of my
computer and jump on it for causing me 5 hours of pain and suffering.any
ways of killing it slowly too is appreciated.

Even if you cant answer the first questions the last two will do, the
[EMAIL PROTECTED]@#%@ [EMAIL PROTECTED]@# PHPSESSID....

Thanks in advance,
-Ryan


-- No, I dont just sound crazy....I AM crazy. --




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to