#40747 [Opn->Csd]: Reproducible Crash
| From: | tony2001@php.net | Date: | Fri, 09 Mar 2007 10:29:40 +0000 |
| Subject: | #40747 [Opn->Csd]: Reproducible Crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-110121@lists.php.net to get a copy of this message | ||
ID: 40747
Updated by: tony2001@php.net
Reported By: th at domainbox dot de
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: Debian Sarge
PHP Version: 4.4.6
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-03-08 12:24:04] th at domainbox dot de
I could solve this problem changeing mod_files.c. Note that i'm not a
programmer ;)
--- php4-STABLE-200703070730/ext/session/mod_files.c 2007-01-05
02:33:20.000000000 +0100
+++ php4-STABLE-200703070730-dbx/ext/session/mod_files.c
2007-03-08 13:09:48.000000000 +0100
@@ -280,8 +280,10 @@
if (data->lastkey)
efree(data->lastkey);
- efree(data->basedir);
- efree(data);
+ if (data->basedir)
+ efree(data->basedir);
+ if (data)
+ efree(data);
*mod_data = NULL;
return SUCCESS;
This returns my php installation to the expected behavior:
Warning: session_start() [function.session-start]: open_basedir
restriction in effect. File(/tmp) is not within the allowed path(s):
(/home/user) in /home/user/html/test.php on line 3
------------------------------------------------------------------------
[2007-03-08 06:53:07] th at domainbox dot de
I retried this on a different System, same behavior in 4.4.6 and
php4-STABLE-200703070730. This is my compile Script:
#!/bin/sh
echo "##############################################################"
echo "#### PHP"
echo "##############################################################"
tar xvzf php4-STABLE-200703070730.tar.gz
cd php4-STABLE-200703070730
echo "###### Running configure on php"
./configure \
--prefix=/usr \
--with-gd \
--with-ttf \
--with-freetype \
--with-freetype-dir=/usr \
--with-imap \
--with-iconv \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-mcrypt=/usr \
--with-zlib \
--with-mysql \
--with-gettext \
--with-config-file-path=/etc/httpd \
--with-ldap-dir=/usr \
--enable-filepro \
--enable-dba \
--enable-ctype \
--enable-wddx \
--enable-exif \
--enable-bcmath \
--enable-track-vars \
--enable-sockets \
--enable-trans-sid \
--enable-dbase \
--no-recursion \
--with-apxs
echo "###### Running make on php"
make
make install
Calling session_save_path with any value gives the expected behavior
like: Warning: session_start() [function.session-start]:
open(bla/sess_e5d8178fe831d9fa1f29f188c397123c, O_RDWR) failed: No such
file or directory (2)
------------------------------------------------------------------------
[2007-03-07 14:45:00] tony2001@php.net
This code snippet works perfectly fine.
------------------------------------------------------------------------
[2007-03-07 14:22:23] th at domainbox dot de
The problem seems to be that xt::Commerce's configuration variable
SESSION_WRITE_DIRECTORY is set to an emtpy value.
The problem can be reduced to this code snippet:
<?
session_save_path("");
session_start();
?>
------------------------------------------------------------------------
[2007-03-07 10:15:32] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/40747
--
Edit this bug report at http://bugs.php.net/?id=40747&edit=1