php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5543 Problem with specifying sessions files path in virtual domains
Submitted: 2000-07-12 20:10 UTC Modified: 2000-08-20 02:57 UTC
From: Leknor at Leknor dot com Assigned: zak (profile)
Status: Closed Package: Session related
PHP Version: 4.0.1pl2 OS: Linux 2.2.16 / Apache 1.3.12
Private report: No CVE-ID: None
 [2000-07-12 20:10 UTC] Leknor at Leknor dot com
I'm hosting a few virtual domains and I want to keep the session files in separate directories. I found that when I change the 'session.save_path' option via a php_value in an apache VirtualHost defination causes this error:

[Tue Jul 11 19:44:51 2000] [notice] child pid 5138 exit signal Segmentation fault (11)

and here is an example of the httpd.conf section:

...
<VirtualHost leknor.com>
 ...
 /leknor/sessions
 ...
</VirtualHost>
...

I have:
* tried many varriations of file permissions/owners on the session dir
* tried different locations including the one above and /tmp/leknor.com
* tried setting php_value session.save_path /tmp and it generates a seg fault also even though it is the same settion as the global config in php.ini

What is strange IMO is that even thought the child pid seg faults the session seems to get read/written to disk correctly. which leads me to believe that fault is in the session file close code.

The following work around seems to work for me:
Before you call session_start(); in your php code call session_save_path("/some/path"); eg:

...
session_save_path("/home/leknor/sessions");
session_start();
...

If you need more info on my setup go to:
http://leknor.com/php.php

If a developer needs more info feel free to email me at Leknor@Leknor.com

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-12 20:33 UTC] Leknor at Leknor dot com
For some reason I left out the first part of
php_value session.save_path /home/leknor/sessions
from the httpd.conf example

Opps I wasn't thorough enough,
This isn't specific to php_value session.save_path
I seem to get a seg fault anytime I set any of the session.* options via php_value.
 [2000-07-26 21:34 UTC] zak@php.net
will try to confirm
 [2000-08-17 16:26 UTC] sas@php.net
This probably has been fixed in CVS. Please try a snapshot and let us know whether it works for you:

http://snaps.php.net/

Thanks.
 [2000-08-20 02:57 UTC] sniper@php.net
Reopen if problem persists with latest CVS.

--Jani
 [2002-08-20 19:22 UTC] screen at brainkrash dot com
I'm having what would seem to be the same problem noted here on Solaris 5.8 w/ php 4.2.2. I'm running in a base_opendir environment and i'm trting to set session.save_path via ini_set to a directory within the opendir path. I'm seeing the sess_* files created with owner rw perms and 0 bytes before the segfault occurs on the call to session_start().

I've also tried switching to using a mysql based session save handler and received the same segfault on session_start, obviosuly without any files being created.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 00:01:30 2024 UTC