Daniel SvanbäCk wrote:
> Hi
> I have a problem. I can't send the session_id to the next page. It worked
> before (when I had an old version of php, now I have 4.2.0). It can send the
> session_id() if it's a link, but not a header(). If it is a header I have to
> do this:
> define('MYSID', session_name().'='.session_id());
> header('Location: ../index.php?'.zOLSID);
> Do I have to add this to every header()? Or is there a easyier way. I have
> global variables = on.
> //Daniel

Straight from the manual at http://www.php.net/manual/en/ref.session.php

PHP is capable of doing this transparently when compiled with 
--enable-trans-sid. If you enable this option, relative URIs will be 
changed to contain the session id automatically. Alternatively, you can 
use the constant SID which is defined, if the client did not send the 
appropriate cookie. SID is either of the form session_name=session_id or 
is an empty string.

You probably didn't have --enable-trans-sid when you configured/compiled PHP

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

Reply via email to