session question...

From: Date: Tue, 23 Nov 1999 23:02:48 +0000
Subject: session question...
Groups: php.version4 
Request: Send a blank email to php-version4+get-6778@lists.php.net to get a copy of this message
I've read the docs, but session variables have presented quite the trial for me. My first question is, does apache or php4 require certain modules compiled with it so php4/apache can use session variables? My first assumption (after checking my syntax) was that I had missed some compile options or modules. I've compiled php4b3 with --enable-trans-sid, --enable-track-vars, --with-mysql, --with-apache=/opt/apache_1.3.9. I read a couple of posts that said you had to have trans-sid and track-vars. Apache was compiled with php4 and mod_rewrite. I'm attempting do a '<META http-equiv="refresh" content="15; URL=http://198.145.105.139/clm2/clm2.php4">' of a web page, every 15 seconds or so, when I refresh I want to maintain the state of my count so when I do, I can output the next 30 lines out to a fresh page. _________________________________________________________ $count; // if session variable 'count' is not registered, do so. if(!(session_is_registered("count"))) { printf("count not registered"); session_start(); // This is line 56 session_register("count"); }else{ printf("count is registered"); } __________________________________________________________ Second question, why do I get this error: __________________________ count not registered Warning: Cannot add header information - headers already sent in /usr/local/apache/clm2/clm2.php4 on line 56 ___________________________ My apologies if this isn't the appropriate forum for this question, I couldn't find anywhere else to go. Any help would be greatly appreciated. Thanks! David Sheckler

« previous php.version4 (#6778) next »