faqts : Computers : Programming : Languages : PHP : Common Problems : Sessions and State

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 24 people (21%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

Can't get session propagation to work. Already compiled with --enabled-trans-sid. Am I supposed to code url in a certain way? Thanks

Feb 28th, 2002 12:06
Narendra Jain, Marc Fournier, Luboslav Gabal, Gabriel Goh,


Check you have session.use_trans_sid set in your php.ini, and then 
every relative link (<a href="../file.php">click here</a>) will have 
the session appended. Note: it doesn't work with absolute URLs,  
(http://server.com/file.php) even if server.com == $HTTP_HOST...
If you do not have an access to the php.ini file, then write a small
script to check phpinfo(). Look at the generated info for PHP. If it
says that the sessions are supported, then the problem is with the
coding.
It is always a good idea to pass on the PHPSESSID to all your pages.
That way, you can rule out a server specific PHP settings for your own
pages to run correctly.
Look at the session documentation by clicking on the link below:
http://www.php.net/manual/en/ref.session.php
Hope this helps...
Narendra Jain