September 29th, 2000, 11:10 AM
I've converted from asp to php, but I can't find out about the sessions.......
Can someone tell me how to "turn them on".
September 29th, 2000, 11:59 AM
Are you using PHP4? Sessions are not supported in PHP3 (though you can install PHPLIB -- I don't have the URL at my fingertips but do a search for that and you'll find it).
Sessions can be started explicitly with:
or implicitly with:
You must one of the above on each page where you wish to access session variables.
September 29th, 2000, 12:56 PM
I'm using PHP4.
I've tryed to use the session_start() but I get the warning : "Warning: Cannot send session cookie - headers already sent" and the same with the cache limiter.
it seems like I am able to create the session. I echo the session_id() after starting a session, but how can I keep the sessionID. I haven't figured out the <?=$SID?> which should be put at the end of links. I get $SID?> from the HTTP_GET_VARS.
I guess I haven't got the hang of PHP sessions yet....
[This message has been edited by bjorngb (edited September 29, 2000).]
September 29th, 2000, 02:52 PM
session_start() has to be called before ANY output, either HTML directly or via print, echo, etc.
If you don't have short tags enabled than the <?= syntax won't work and you'll need to use <?PHP print $SID ?>