php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20091 session.save_path of php.ini not honored in module mode
Submitted: 2002-10-25 12:37 UTC Modified: 2002-10-29 02:34 UTC
From: sven dot schnitzke at t-online dot de Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.2 4.3 OS: Win 98 SP2
Private report: No CVE-ID: None
 [2002-10-25 12:37 UTC] sven dot schnitzke at t-online dot de
My config is

Win 98 SP2; Apache 1.3.23; PHP 4.2.2

with no php-related files in any windows or system folder (this is because I'd like to evaluate a new
version in parallel - not having a second "identical" system)

PHP is working fine in CGI mode (for example I use PHPmyAdmin 2.2rc4) and phpinfo() tells the correct path 
for the session files.
With no change to the PHP inst or config but just by changing the PHP usage mode in Apaches httpd.conf from CGI to module mode (and closing and reopening Apache) this changes: in module mode session.save_path is ignored.
I guess this comes from a dependency on the execution environment (namely the path of the executable), which is clearly changed by that action from php.exe to apache.exe.
Without knowing all the details I guess the manual should clearly point out this difference between cgi
and module mode. I bet it accounts for more uncertainty in using and spelling pathnames in php.ini which
can be read out of the user comments that accompany the inst section of the manual.

By the way: in module mode copying php.ini to the Apache.exe folder disables loading of the php 
extensions: here one seems to depend upon the location of php.ini which is looked for in the execution 
folder (of Apache.exe in ths case) in the first place and therefore ceases to be a good start for 
"./any folder".

On the other hand: a parallel installation of PHP 4.3 ceases to work in CGI mode: I get "Server 500"-
messages, whereas module mode allows for running some apps - for example PHPmyAdmin - but 
session.path_name is ignored here also.

My conclusion (and request for feature) is to come up with the following strategy:
locate a file "php-location.ini" in c:\windows. Sole content is the name of the root folder of the current
PHP inst (The folder where php.exe, php4ts.dll and php.ini reside). All relative pathnames in php.ini should 
be based on this location. Alternatively a registry key could be used.

Please take the corner and do not impose putting the dlls or php.ini into the system folder - this one is 
cluttered enough.

Hope this is helpful.
Sven

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-25 12:41 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-10-27 14:44 UTC] sven dot schnitzke at t-online dot de
No luck! Comments hold for 4.3-dev as of Oct 24, 2002

Server 500 errors for cgi mode vanish with changing the
"Action" directive in httpd.conf from "/php/php.exe" to
"/php/php-cgi.exe". The first form worked well with 4.2.2

I would like opinions on my proposal for basing relative
path specs in php.ini on some explicit central root spec.
Thank you
 [2002-10-27 14:52 UTC] sniper@php.net
Heh..you should read NEWS file sometimes. :)
Anyway, from 4.3.0 on the CGI binary is called php-cgi
to not mix it with the CLI binary, which is called php.

 [2002-10-29 02:34 UTC] sven dot schnitzke at t-online dot de
Thanks for your advice ;).
As with my main complaint - (see summary) CVS snap 4.3 of 
28.10.2002 15:04 fixes it Thank You!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 22:01:26 2024 UTC