#44722 [Opn->Csd]: The save_path cannot contain NULL characters
| From: | scottmac@php.net | Date: | Tue, 15 Apr 2008 00:33:07 +0000 |
| Subject: | #44722 [Opn->Csd]: The save_path cannot contain NULL characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-124240@lists.php.net to get a copy of this message | ||
ID: 44722
Updated by: scottmac@php.net
Reported By: antphill at uk dot ibm dot com
-Status: Open
+Status: Closed
Bug Type: Session related
Operating System: SUSE Linux
PHP Version: 6CVS-2008-04-14 (snap)
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:
------------------------------------------------------------------------
[2008-04-14 16:27:37] antphill at uk dot ibm dot com
In fact just this script causes the segmentation fault:
<?php
var_dump(session_save_path());
?>
Note I have no php.ini actually being used, just the default settings!
------------------------------------------------------------------------
[2008-04-14 16:22:20] antphill at uk dot ibm dot com
Forgot to ssay, this happens with both unicode semantics enabled and
disabled.
------------------------------------------------------------------------
[2008-04-14 16:20:43] antphill at uk dot ibm dot com
Description:
------------
Calling session_save_path() with no arguments produces a warning: "The
save_path cannot contain NULL characters" and returns FALSE instead of
an empty string. This only reproduces on Linux, on Windows the test
passes as expected.
Reproduce code:
---------------
<?php
ob_start();
echo "*** Testing session_save_path() : error functionality ***\n";
$directory = dirname(__FILE__);
var_dump(session_save_path());
var_dump(session_save_path($directory));
var_dump(session_save_path());
echo "Done";
ob_end_flush();
?>
Expected result:
----------------
--EXPECTF--
*** Testing session_save_path() : error functionality ***
string(0) ""
string(0) ""
string(%d) "%s"
Done
--UEXPECTF--
*** Testing session_save_path() : error functionality ***
unicode(0) ""
unicode(0) ""
unicode(%d) "%s"
Done
Actual result:
--------------
*** Testing session_save_path() : error functionality ***
Warning: session_save_path(): The save_path cannot contain NULL
characters. in
/mnt/hgfs/Projects/Session/php-6.0/session_save_path_basic.php on line
14
bool(false)
string(0) ""
string(34) "/mnt/hgfs/Projects/Session/php-6.0"
Done
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44722&edit=1