php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24410 Session data not written/stored
Submitted: 2003-06-30 10:30 UTC Modified: 2003-06-30 15:39 UTC
From: tommy_in_japan at nospam dot hotmail dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.3.2 OS: Win XP Professional
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tommy_in_japan at nospam dot hotmail dot com
New email:
PHP Version: OS:

 

 [2003-06-30 10:30 UTC] tommy_in_japan at nospam dot hotmail dot com
Description:
------------
I've tried everything (I think), and can't get PHP to store any session data.  I specified a session data directory that the web server has read/write permissions for, and the session arrays get modified on the page where the variables are set, yet nothing gets written to disk (and therefore not passed to any other pages, from which I can't reference the variables).

PHP.ini settings:
session.save_handler = files
session.save_path = c:/temp
;note: "c:\temp" and "/temp" etc. also do not work
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.cache_expire = 180

Reproduce code:
---------------
[test.php]
session_start();
$_SESSION["test"] = "test";

echo $_SESSION["test"];
//works fine, but when referencing in any other file
//(via redirect or anything else)...

[test2.php]
session_start();
echo $_SESSION["test"];
//returns nothing


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 13:01 UTC] postings-php-bug at hans-spath dot de
When you execute a script containing "<? phpinfo(); ?>", does the line "Configuration File (php.ini) Path" return the correct path?
 [2003-06-30 15:35 UTC] tommy_in_japan at nospam dot hotmail dot com
For some reason, it reported the session.save_path directory as "/tmp".  I created a c:\tmp directory and now session variables seem to work fine.  Any idea why the settings I have in php.ini aren't being recognized?

Thanks for your help.
 [2003-06-30 15:37 UTC] tommy_in_japan at nospam dot hotmail dot com
I see the problem now...the save path was pointing to the wrong directory (as you suggested).  Thanks again!
 [2003-06-30 15:39 UTC] derick@php.net
user error -> bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 20:01:32 2024 UTC