PHP4 & sessions Questions

From: Date: Mon, 26 Jun 2000 16:24:03 +0000
Subject: PHP4 & sessions Questions
Groups: php.dev 
Request: Send a blank email to php-dev+get-22363@lists.php.net to get a copy of this message
I have a problem and some questions, if this isn't the list to post to, please let me know which one is. First the question: the session_start() function, must this be done at the top of every page on the site; something that should be put into a header.inc file? The problem: I am going to be working on a process which is going to require session variables. But here's what I have been reading. If it's in a cookie that may not work if someone has disabled cookies so I'm thinking of using the <?=SID?> technique. But then I read that if I I compile with '--enable-trans-sid' then I won't have to do that. Oh, and to make my life easier, I decided to put into the configuration file: session.auto_start = 1 (big mistake) Many of my sites then stopped working. This is what I see happening: Let's say I have code which will dynamically send someone to another directory, I put the link: http://www.domain.com/<? echo $directory; ?> it works perfectly, it outputs: http://www.domain.com/mydirectory/ Well, with --enable-trans-sid on and this auto_start happening I get this as an output: http://www.domain.com/&PHPSESSID=763038de1adfc7bbb955611686a23e65004-20 It seems that whatever I echo there it is replaced by the session ID. I have a link which links to a Real Audio File: http://www.domain.com/freel.phtml?raid=<? echo $rafile; ?> which outputs http://www.domain.com/freel.phtml?raid=rafile.ram but with this session thing on it gives me: http://www.domain.com/freel.phtml?raid=&SESSIONS=763038de1adfc7bbb955611686a 23e65004-20 I just don't get it! Anyone have any answers? -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.dev (#22363) next »