Your original code works for me, so it is a config issue somewhere. Add this code to each file, to verify that the session ID is being correctly passed:
echo "session id is " . session_id() . "<br>"; Also, is your php.ini in /usr/local/lib? If PHP can't find it, it will use its built-in defaults, which is register_globals off. Kirk > -----Original Message----- > From: Lee Stewart [mailto:[EMAIL PROTECTED] > Sent: Friday, July 25, 2003 2:00 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Debugging a Session Problem > > > At 11:55 AM 7/25/2003, you wrote: > >If you are relying on cookies to transmit the session ID, > make sure you have > >session cookies enabled in your browser. Also check that you > don't have an > >.htacess file in your directory that is overriding the > register_globals > >setting. Turn your error_reporting up to E_ALL and see if > PHP has anything > >to say to you. > > Yes, cookies are enabled in the browser (and the same browser > works with > the application on the old system). And no .htaccess files. > > When I set error_reporting to E_ALL I do get: > Notice: Undefined variable: test in > /srv/www/htdocs/etrak/page2.php on line 3 > which is the reference to $test in > echo "test is $test<br>"; > because $test was to have been a session variable, but wasn't > passed. Other than that, no errors. > > CPT John W. Holmes wrote: > >Seem to remember something about starting a session and then > redirecting > >with header causing trouble. Try using session_write_close() > before you > >redirect. > > I also tried adding the session_write_close() with no change... > > Each time I get a new session file in /tmp, but all are zero length... > ls -l /tmp > drwxrwxrwt 6 root root 592 Jul 25 12:48 . > drwxr-xr-x 18 root root 408 Jul 25 12:47 .. > -rw------- 1 wwwrun nogroup 0 Jul 25 12:49 > sess_39e04150efb3de58764ce04dae572401 > -rw------- 1 wwwrun nogroup 0 Jul 25 11:57 > sess_4d9573209bf3688c380d33c94f64be47 > -rw------- 1 wwwrun nogroup 0 Jul 17 16:55 > sess_5160b002714849a598a8a1e62a78a2eb > -rw------- 1 wwwrun nogroup 0 Jul 20 08:36 > sess_7a053a0dd515170e6d0ace739860b71f > -rw------- 1 wwwrun nogroup 0 Jul 25 11:55 > sess_903ef4579ee2f596981aad08efd3bc9d > > Thanks for any debugging suggestions... > Lee > > ---------- > Lee Stewart, Senior SE > Sytek Services, a Division of DSG > (719) 566-0188 , Fax (719) 566-0655 > [EMAIL PROTECTED] > www.sytek-services.com > www.dsgroup.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php