ID: 24572 User updated by: scot at goldentroll dot com Reported By: scot at goldentroll dot com Status: Open Bug Type: Session related Operating System: Apache PHP Version: Irrelevant New Comment:
to use this code i set session.use_trans_sid = off in htaccess (shared server) Previous Comments: ------------------------------------------------------------------------ [2003-07-09 21:32:29] scot at goldentroll dot com Description: ------------ I am using the latest stable release 4.2.3 php_ini - session.use_trans_sid = on Session id's are being appended to all relative links upon first view regardless if cookies are available or not. I can't read a cookie that has been set until the page is reloaded. Reproduce code: --------------- session_start(); if (!$PHPSESSID)){ // PHPSESSID is the session name-hence name of variable set in session_start ini_set('session.use_trans_sid', true); }else { ini_set('session.use_trans_sid', false); } Expected result: ---------------- I would like to know if cookies are available to a page when it loads. I wish PHP did not append the links unless cookies are not available to store the session id and value Actual result: -------------- (!$PHPSESSID) will always be true until the page is reloaded. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24572&edit=1