antique PHP problem

From: Date: Sat, 11 Sep 2004 22:53:58 +0000
Subject: antique PHP problem
Groups: php.general 
Request: Send a blank email to php-general+get-196419@lists.php.net to get a copy of this message
I'm doing a project on a server with an old version of PHP -- 4.0.6 on Apache 1.3.22 on FreeBSD and I'm having a problem with session variables. From code in a script that receives a post: ----- session_start(); $HTTP_SESSION_VARS["m_name"] = get_magic_quotes_gpc() ? stripslashes($HTTP_POST_VARS["m_name"]) : $HTTP_POST_VARS["m_name"]; ----- Then later I can successfully echo the posted value with: ----- htmlentities($HTTP_SESSION_VARS["m_name"]) ----- The posted value is shown as expected, which means the session variable is set, right? At the end of the receiving script page I have a link back to the form where the values were posted from, and in the original form I check for session variables in order to re-populate the form with them if they're present: ----- session_start(); $m_name = isset($HTTP_SESSION_VARS["m_name"]) ? $HTTP_SESSION_VARS["m_name"] : ""; ----- Then in the original HTML form field: ----- <?php echo($m_name); ?> ----- But $m_name == "" and the field is blank. The same code works as expected on a different server running PHP 4.3.8 on Apache 1.3.31 on Linux. I think I'm stuck with 4.0.6 for this project. I'd appreciate any suggestions on what I should check/advice on using $HTTP_SESSION_VARS. -- Lowell Allen

« previous php.general (#196419) next »