RE: [PHP] Debugging a Session Problem
| From: | Lee Stewart | Date: | Fri, 25 Jul 2003 19:59:57 +0000 |
| Subject: | RE: [PHP] Debugging a Session Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156936@lists.php.net to get a copy of this message | ||
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 3which 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_903ef4579ee2f596981aad08efd3bc9dThanks for any debugging suggestions... Lee ---------- Lee Stewart, Senior SE Sytek Services, a Division of DSG (719) 566-0188 , Fax (719) 566-0655 lstewart@dsgroup.com www.sytek-services.com www.dsgroup.com