From: pasamio at gmail dot com
Operating system: Linux/Apache2
PHP version: 5.2.5
PHP Bug Type: Session related
Bug description: session_name() fails to set a new name when used with
php_admin_value
Description:
------------
When the value is left at defaults or set with php_value in a .htaccess
file the setting updates. When using php_admin_value, session_name remains
the same. There is no mention in documentation of this being impossible, so
I believe it to be a bug.
The sample code shows that when configured using php_admin_value the
session_name() doesn't change.
Would appear to be related to this as session_name actually calls
zend_alter_ini_entry:
Bug #41561 Values set with php_admin_* in httpd.conf can be overwritten
with ini_set()
Reproduce code:
---------------
In the httpd.conf (or similar) add:
php_admin_value session.name adminvalue
<?php
$oldname = session_name("new");
$newname = session_name();
echo 'Old Name: ' . $oldname . '<br />';
echo 'New Name: ' . $newname . '<br />';
Expected result:
----------------
Old Name: adminvalue
New Name: new
Actual result:
--------------
Old Name: adminvalue
New Name: adminvalue
--
Edit bug report at http://bugs.php.net/?id=43747&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43747&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43747&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43747&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43747&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43747&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43747&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43747&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43747&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43747&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43747&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43747&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43747&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43747&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43747&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43747&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43747&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43747&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43747&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43747&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43747&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43747&r=mysqlcfg