php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28724 session.save_path appears to be ignored
Submitted: 2004-06-10 12:58 UTC Modified: 2004-06-10 14:31 UTC
From: php at tjworld dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.7 OS: Windows 2003 Server Enterprise
Private report: No CVE-ID: None
 [2004-06-10 12:58 UTC] php at tjworld dot org
Description:
------------
session.save_path appears to be ignored even though phpinfo() shows that the correct php.ini file, and session.save_path are set.

As a result a PHP warning is returned in the head of the HTML of files that call session.start() and a session dat file isn't created in session.save_path.

Using IIS6, in IIS 5 isloation mode. Executing cgi.exe not the ISAPI filter.

Working with a clean install of osCommerce 2.2m2. 
Non-session code appears to work.

Permissions on the session.save_path directory are set to allow modify/read/write by the IUSR_MACHINE_NAME account.

phpinfo() confirms the config file as:
C:\Windows\php.ini

[PHP]
register_globals = On

[Session]
session.save_path = D:\Server\PHP4\sessiondata\ 

Using System Internals FileMonitor shows that php.exe is attempting to open/write to D:\tmp\?????? even when phpinfo() shows that session.save_path is set as shown above. No attempts to access session.save_path are shown.


Reproduce code:
---------------
  function tep_session_start() {
    return session_start();
  }


Expected result:
----------------
Expect to see session data files in session.save_path, and no warnings reported.

Actual result:
--------------
When D:\tmp (with appropriate permissions) exists the HTML returns with no warnings in the HEAD, and a session data file is created in the directory.

If D:\tmp doesn't exist, no session data file is created and warnings are returned in the HTML HEAD:-

Warning:  session_start(): open(/tmp\sess_fdbfaf6a09ec7734f73e7ac88dfd00be, O_RDWR) failed: No such file or directory (2) in D:\Inetpub\hostingRoot\domain\http\members\catalog\admin\includes\functions\sessions.php on line 67


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-10 14:31 UTC] php at tjworld dot org
Discovered during configuration of osCommerce, that it has an option in Admin, under Configuration->Sessions, for "Session Directory" and it was set to "/tmp".

So the problem described was not due to PHP.

I did do a text search of all the oscommerce files for "tmp" because to begin with I suspected it was osCommerce overiding the PHP setting.

Well at least now we know. Hope this helps someone else.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 12:01:33 2024 UTC