#36041 [Opn->Bgs]: session.use_trans_sid does not work

From: Date: Tue, 17 Jan 2006 18:57:37 +0000
Subject: #36041 [Opn->Bgs]: session.use_trans_sid does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92090@lists.php.net to get a copy of this message
ID: 36041 Updated by: tony2001@php.net Reported By: miguelangeldavila at argotvisual dot net -Status: Open +Status: Bogus Bug Type: Session related Operating System: Linux PHP Version: 5.1.2 New Comment: Constants are not carried through requests. Previous Comments: ------------------------------------------------------------------------ [2006-01-17 19:36:37] miguelangeldavila at argotvisual dot net PHP 5.1.2 does not assign the correct value to the constant SID. I did a test: #### Origin page #### --------------------------- <?php // Origin page: session_start(); $_SESSION['Perfil'] = hola; echo "<pre>"; print_r($_SESSION); echo "\nconstant SID: ".SID; echo "\nconstant(\"SID\") ". constant("SID"); if (defined('SID')) { echo "\nSID is defined"; } echo "\n"; echo "</pre>"; ?> <a href="pba1.php">Destination page</a> -------------------------------------- As espected SID echoes PHPSESSID=5c2a8e480f4c0b649850fb6da527a6ab And the constant seems to be declared. But in the destination page SID echoes none value (blank). The constant seems to be declared using: if (defined('SID')) { echo "\nSID is defined"; } #### Destination page code #### <?php // Destination page session_start(); echo "<pre>"; print_r($_SESSION); define("SID", session_name() ."=".session_id()); echo "\nconstant SID value: ".SID; echo "\nQuering by constant(\"SID\") ". constant("SID"); if (defined('SID')) { echo "\nSID is defined"; } echo "</pre>"; echo "\n"; ?> <a href="pba.php">Origin page</a> As consequence the session is not transfered via SID. ------------------------------------------------------------------------ [2006-01-17 07:52:10] sniper@php.net It won't be printed if it's available through other means, in this case in the cookie. This is expected behaviour. (hint: Turn off cookies..) ------------------------------------------------------------------------ [2006-01-17 03:24:52] miguelangeldavila at argotvisual dot net Description: ------------ PHP 5.1.2 does not print session_id automatically into pages code. The session.use_trans_sid stoped working after install PHP 5.1.2. Despite php.ini has session.use_trans_sid=1, and even the program has a line ini_set('session.use_trans_sid', 1); Reproduce code: --------------- php.ini session.use_trans_sid=1 code ini_set('session.use_trans_sid', 1); Expected result: ---------------- <a href="page.php?PHPSESSION=XXXXXXXXXXX"> <form method="post" action="auditores_form_delete.php?PHPSESSION=XXXXXXXXXXX"> Actual result: -------------- <a href="page.php> <form method="post" action="auditores_form_delete.php> PHP does not print session id automatically ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36041&edit=1

« previous php.bugs (#92090) next »