ID:               38422
 User updated by:  strube at physik3 dot gwdg dot de
 Reported By:      strube at physik3 dot gwdg dot de
 Status:           Bogus
 Bug Type:         Session related
 Operating System: Solaris 9 (SPARC)
 PHP Version:      4.4.3
 New Comment:

Sorry, I overlooked the last column of the table in Appendix G:
PHP_INI_ALL in PHP <= 4.2.3. PHP_INI_PERDIR in PHP < 5.

But the Makefile has still to be changed for 4.4.3.


Previous Comments:
------------------------------------------------------------------------

[2006-08-11 10:26:28] strube at physik3 dot gwdg dot de

Then the documentation is wrong, which states PHP_INI_ALL in
"Appendix G. php.ini directives".
Also, in the Makefile (line 154), option -d 'session.use_trans_sid=1'
must be added for the run-tests.php call in order to prevent failure of
ext/session/tests/bug36459.phpt.

------------------------------------------------------------------------

[2006-08-11 10:15:36] [EMAIL PROTECTED]

ini_set() returns FALSE, not 0 and this is expected since you cannot
change it using ini_set() as the flag is
PHP_INI_SYSTEM|PHP_INI_PERDIR.


------------------------------------------------------------------------

[2006-08-11 10:02:29] strube at physik3 dot gwdg dot de

Correction (Script 2 should set to 0, not to 1):
*** Script 2:
<?php
printf("%d\n",ini_get('session.use_trans_sid'));
printf("%d\n",ini_set('session.use_trans_sid',0));
printf("%d\n",ini_get('session.use_trans_sid'));

------------------------------------------------------------------------

[2006-08-11 10:00:06] strube at physik3 dot gwdg dot de

Description:
------------
In PHP 4.4.2 and 4.4.3 (cannot test earlier ones any more), the option
session.use_trans_sid cannot be changed by function ini_set, but can be
changed using php.ini or the command-line option -d. Also ini_set always
returns 0 as the old value for session.use_trans_sid, even if it was set
to 1. (BTW, this causes test ext/session/tests/bug36459.phpt to fail --
not because of bug 36459, of course.)
The bug persists even on a second call to ini_set (unlike bug #30422).
Configuration:
env CC=/opt/SUNWspro/bin/cc CFLAGS=-xO2 \
./configure  --enable-discard-path --enable-force-cgi-redirect
--with-ndbm --with-dba --with-db --with-db2=/opt/dpiwww/apache
--with-mysql=/opt/dpiwww/mysql --enable-sysvsem --enable-sysvshm
--with-exec-dir=/opt/dpiwww/php/bin
--with-config-file-path=/opt/dpiwww/php/lib --prefix=/opt/dpiwww/php
--disable-debug --with-zlib --with-bz2 --with-gd
--with-jpeg-dir=/usr/sfw --with-png-dir=/usr/sfw
--with-xpm-dir=/usr/openwin --with-freetype-dir=/usr/sfw
--enable-gd-native-ttf


Reproduce code:
---------------
*** Script 1:
<?php
printf("%d\n",ini_get('session.use_trans_sid'));
printf("%d\n",ini_set('session.use_trans_sid',1));
printf("%d\n",ini_get('session.use_trans_sid'));

*** Script 2:
<?php
printf("%d\n",ini_get('session.use_trans_sid'));
printf("%d\n",ini_set('session.use_trans_sid',1));
printf("%d\n",ini_get('session.use_trans_sid'));

Expected result:
----------------
*** Script 1:
If previously 0:
0
0
1
If previously 1:
1
1
1

*** Script 2:
If previously 0:
0
0
0
If previously 1:
1
1
0

Actual result:
--------------
*** Both Scripts:
If previously 0:
0
0
0
If previously 1:
1
0
1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38422&edit=1

Reply via email to