|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-10-12 18:51 UTC] matt at dfstudios dot com
This is probably related to the issue described in http://bugs.php.net/bug.php?id=19877. In 4CVs-2002-10-12 session_decode() appears to be non-functional. The function simply does nothing - no values are returned and no variables are set. I have verified that I'm passing the function a properly formatted session data string. register_globals is on. Here's my configure line: ./configure --with-mysql --with-apache=/root/apache_1.3.27 --enable-track-vars --enable-trans-sid --enable-sigchild --enable-ftp --enable-debug --enable-sockets I'm using the CVS version because I was experiencing the session_decode crash bug with version 4.2.x (see previous bug report - URL given above). Perhaps these two issues are related? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 24 12:00:02 2025 UTC |
To answer iliaa's question: No, session_start is called on a separate page. This is really weird, I made up the following script as per Sniper's request: <? session_start(); session_register('testvar'); $testvar = "test"; $data = session_encode(); $testvar = "false"; session_decode($data); echo("$testvar"); ?> Strangely, THIS script works fine (if it was 'broken', it should output "false", while it in fact prints "test"). However, I've made another script where the error is replicated: www.dfstudios.com/session_test.php Here's the source: session_test.php------ <? session_start(); session_register('testvar'); $testvar = "test"; $data = session_encode(); echo("testvar is \"$testvar\", and has been encoded: $data <br><br>"); ?> <a href="session_test2.php?<? echo("$data"); ?>>Click here for page two</a> session_test2.php------ <? session_decode($QUERY_STRING); echo("testvar is \"$testvar\", and the string used for decoding is $QUERY_STRING <br><br>"); ?> Notice how $testvar is properly set on the first page and encoded properly, but in the second page $testvar is null. It seems that if session_start and session_decode are called in separate pages the decode function fails.