Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: No Feedback Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. Previous Comments: [2002-04-03 01:22:04] [EMAIL PROTECTED] Nothing changed between 4.1.1 and 4.1.2, but you can try the windows binaries for php 4.2.0rc1 from www.php.net/~derick [2002-04-02 19:42:57] [EMAIL PROTECTED] OK, so this obviously doesn't work in the 4.1.2 version of PHP... Does anybody have a link to somewhere I could download the previous 4.1.1 version?? Can't seem to find it... Thanks! [2002-03-27 19:05:42] [EMAIL PROTECTED] Hope this isn't too much of a 'me too!'. I have the same problem on W2K/IIS5 running PHP 4.1.2 as an ISAPI module. I have looked at the session files in the temp directory and they seem to be created and populated with variables without any trouble. The problem is that any page referencing them returns an 'index not valid' error. I too am using $_SESSION. The only way I can get it to work is if I do sessions the old-fashioned way, ie: $foo = 'bar'; session_register( $foo ); If I go back to 4.1.1 everything works fine (using $_SESSION). Peter. [2002-03-26 22:34:20] [EMAIL PROTECTED] I recently upgraded to 4.12 running W98: Apache 1.3.19, Win32 PHP/4.1.3-dev running; reg_globals OFF; trying to work my way through sessions. Yikes!! It is hard to figure how it works or when to use $_SESSION or HTTP_SESSION_VARS, w/ or without session_register(). /* this seems to ~work sort of, maybe... $ship_type = $HTTP_SESSION_VARS['ship_type']; //or with $_SESSION.. which seems to be erratic session_unregister(ship_type); $ship_type= 'trs'; //$ship_type + 1; session_register(ship_type); flush(); // This allows other pages to show the revised value via $_SESSION[ship_type] Now if I could just erase a pair in an array with unset... Keep up the goodwork! [2002-03-25 20:14:53] [EMAIL PROTECTED] This comment is just to say that I am experiencing the same problem with PHP 4.1.2 as CGI, Windows 98 SE German, Apache 1.3.20, using php.ini with register_globals turned OFF and neither $_SESSION nor $HTTP_SESSION_VARS is working. A session file is created in the sessions directory but no variables are stored within it. A typical error I get when trying to use a variable previously stored in $_SESSION is: Warning: Undefined index: text in session_2.php on line 3. I mistakenly reported this as a new bug to http://bugs.php.net/bug.php?id=16273edit=2 but I set that to Duplicate now, so I hope it will be ok. Sorry. Robert The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16102 -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Analyzed +Status: Feedback Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: Nothing changed between 4.1.1 and 4.1.2, but you can try the windows binaries for php 4.2.0rc1 from www.php.net/~derick Previous Comments: [2002-04-02 19:42:57] [EMAIL PROTECTED] OK, so this obviously doesn't work in the 4.1.2 version of PHP... Does anybody have a link to somewhere I could download the previous 4.1.1 version?? Can't seem to find it... Thanks! [2002-03-27 19:05:42] [EMAIL PROTECTED] Hope this isn't too much of a 'me too!'. I have the same problem on W2K/IIS5 running PHP 4.1.2 as an ISAPI module. I have looked at the session files in the temp directory and they seem to be created and populated with variables without any trouble. The problem is that any page referencing them returns an 'index not valid' error. I too am using $_SESSION. The only way I can get it to work is if I do sessions the old-fashioned way, ie: $foo = 'bar'; session_register( $foo ); If I go back to 4.1.1 everything works fine (using $_SESSION). Peter. [2002-03-26 22:34:20] [EMAIL PROTECTED] I recently upgraded to 4.12 running W98: Apache 1.3.19, Win32 PHP/4.1.3-dev running; reg_globals OFF; trying to work my way through sessions. Yikes!! It is hard to figure how it works or when to use $_SESSION or HTTP_SESSION_VARS, w/ or without session_register(). /* this seems to ~work sort of, maybe... $ship_type = $HTTP_SESSION_VARS['ship_type']; //or with $_SESSION.. which seems to be erratic session_unregister(ship_type); $ship_type= 'trs'; //$ship_type + 1; session_register(ship_type); flush(); // This allows other pages to show the revised value via $_SESSION[ship_type] Now if I could just erase a pair in an array with unset... Keep up the goodwork! [2002-03-25 20:14:53] [EMAIL PROTECTED] This comment is just to say that I am experiencing the same problem with PHP 4.1.2 as CGI, Windows 98 SE German, Apache 1.3.20, using php.ini with register_globals turned OFF and neither $_SESSION nor $HTTP_SESSION_VARS is working. A session file is created in the sessions directory but no variables are stored within it. A typical error I get when trying to use a variable previously stored in $_SESSION is: Warning: Undefined index: text in session_2.php on line 3. I mistakenly reported this as a new bug to http://bugs.php.net/bug.php?id=16273edit=2 but I set that to Duplicate now, so I hope it will be ok. Sorry. Robert [2002-03-20 17:57:04] [EMAIL PROTECTED] Using the $HTTP_SESSION_VARS[foo] = bar is all well and good, but one of the major points about 4.1.x was the new $_SESSION array and its global scope. Infact it got a big mention on the download page. Its only fair to put a big mention that its broke in 4.1.2 as I'm sure that a few devs (myself included) now have broken code using $_SESSION[foo] = bar which is silly to take back to the old way of doing it. Either make a note or release a patch! FWIW, this happens on Apache 1.2.23 in SAPI mode and Apache 2.0.32 beta in CGI mode The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16102 -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: I recently upgraded to 4.12 running W98: Apache 1.3.19, Win32 PHP/4.1.3-dev running; reg_globals OFF; trying to work my way through sessions. Yikes!! It is hard to figure how it works or when to use $_SESSION or HTTP_SESSION_VARS, w/ or without session_register(). /* this seems to ~work sort of, maybe... $ship_type = $HTTP_SESSION_VARS['ship_type']; //or with $_SESSION.. which seems to be erratic session_unregister(ship_type); $ship_type= 'trs'; //$ship_type + 1; session_register(ship_type); flush(); // This allows other pages to show the revised value via $_SESSION[ship_type] Now if I could just erase a pair in an array with unset... Keep up the goodwork! Previous Comments: [2002-03-25 20:14:53] [EMAIL PROTECTED] This comment is just to say that I am experiencing the same problem with PHP 4.1.2 as CGI, Windows 98 SE German, Apache 1.3.20, using php.ini with register_globals turned OFF and neither $_SESSION nor $HTTP_SESSION_VARS is working. A session file is created in the sessions directory but no variables are stored within it. A typical error I get when trying to use a variable previously stored in $_SESSION is: Warning: Undefined index: text in session_2.php on line 3. I mistakenly reported this as a new bug to http://bugs.php.net/bug.php?id=16273edit=2 but I set that to Duplicate now, so I hope it will be ok. Sorry. Robert [2002-03-20 17:57:04] [EMAIL PROTECTED] Using the $HTTP_SESSION_VARS[foo] = bar is all well and good, but one of the major points about 4.1.x was the new $_SESSION array and its global scope. Infact it got a big mention on the download page. Its only fair to put a big mention that its broke in 4.1.2 as I'm sure that a few devs (myself included) now have broken code using $_SESSION[foo] = bar which is silly to take back to the old way of doing it. Either make a note or release a patch! FWIW, this happens on Apache 1.2.23 in SAPI mode and Apache 2.0.32 beta in CGI mode [2002-03-20 12:55:14] [EMAIL PROTECTED] Using session_start() and setting $HTTP_SESSION_VARS['my_Var'] to any value mays help. Here is my code to use the $_SESSION array : //~ session_start(); if (!isset($_SESSION[count])) { $HTTP_SESSION_VARS[count] = 0; } $_SESSION[count]++; echo $_SESSION[count]; //~ PHP Version : 4.1.2 OS : Win2K Server Webserver : APACHE 1.3.22 PHP running as the php.exe [2002-03-19 11:21:04] [EMAIL PROTECTED] Fix it and release a new version or at least make a note on the downloadpage. [2002-03-19 00:39:08] [EMAIL PROTECTED] After reading more posts on this subject, I went back and put some debug code into my application. I see now that the POST variables are fine; the difficulty is with the session variables. The problem appears to be somewhere in php4ts.dll, which is copied to \WINNT\system32 as part of the installation. I mentioned earlier that the version from the link in http://www.zend.com/zend/week/week77.php was OK. The link on that page is now dead. I'm running: Apache_1.3.23-Mod_SSL_2.8.7-OpenSSL_0.9.6c Windows 2000 Pro SP2 + pre-SP3 updates PHP running as module (php4apache.dll); no CGI MySQL 4.0.1-alpha-win This problem with session variables is a big deal, but there is no warning on the download page for Windows users. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16102 -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: Using session_start() and setting $HTTP_SESSION_VARS['my_Var'] to any value mays help. Here is my code to use the $_SESSION array : //~ session_start(); if (!isset($_SESSION[count])) { $HTTP_SESSION_VARS[count] = 0; } $_SESSION[count]++; echo $_SESSION[count]; //~ PHP Version : 4.1.2 OS : Win2K Server Webserver : APACHE 1.3.22 PHP running as the php.exe Previous Comments: [2002-03-19 11:21:04] [EMAIL PROTECTED] Fix it and release a new version or at least make a note on the downloadpage. [2002-03-19 00:39:08] [EMAIL PROTECTED] After reading more posts on this subject, I went back and put some debug code into my application. I see now that the POST variables are fine; the difficulty is with the session variables. The problem appears to be somewhere in php4ts.dll, which is copied to \WINNT\system32 as part of the installation. I mentioned earlier that the version from the link in http://www.zend.com/zend/week/week77.php was OK. The link on that page is now dead. I'm running: Apache_1.3.23-Mod_SSL_2.8.7-OpenSSL_0.9.6c Windows 2000 Pro SP2 + pre-SP3 updates PHP running as module (php4apache.dll); no CGI MySQL 4.0.1-alpha-win This problem with session variables is a big deal, but there is no warning on the download page for Windows users. [2002-03-18 01:49:39] [EMAIL PROTECTED] FYI: Running Win2K Professional and IIS. PHP running as the php.exe [2002-03-17 16:38:08] [EMAIL PROTECTED] This looks similar to what's posted for 16043. In a nutshell, session variables aren't being stored/updated in v4.1.2. When posting, it may help the PHP developers to provide info such as webserver config (e.g., IIS using PHP CGI, Apache using php4apache.dll, etc.). For example, in BUG#16043, it seemed everyone was using Apache (mostly the latest version, v1.3.23). Both SAPI module CGI version seem to be affected. [2002-03-16 21:35:49] [EMAIL PROTECTED] Here's a pretty simple test case, hopefully it's the same problem: index.php ? session_start(); $_SESSION['testone'] = 1; $_SESSION['testtwo'] = 2; ? html head titleTest Home Page/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo'].'brbr'; ? a href=./test.phpGo to test/a /body /html test.php ? session_start(); ? html head titleUntitled/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo']; ? /body /html Output from index.php: testone = 1 testtwo = 2 and the link Output from test.php after clicking on the link: Warning: Undefined index: testone in c:\htdocs\ebbs\test.php on line 9 testone = Warning: Undefined index: testtwo in c:\htdocs\ebbs\test.php on line 10 testtwo = Hopefully everything is valid, but things had been working fine prior to upgrading to 4.1.2 from 4.1.1. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16102 -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: Fix it and release a new version or at least make a note on the downloadpage. Previous Comments: [2002-03-19 00:39:08] [EMAIL PROTECTED] After reading more posts on this subject, I went back and put some debug code into my application. I see now that the POST variables are fine; the difficulty is with the session variables. The problem appears to be somewhere in php4ts.dll, which is copied to \WINNT\system32 as part of the installation. I mentioned earlier that the version from the link in http://www.zend.com/zend/week/week77.php was OK. The link on that page is now dead. I'm running: Apache_1.3.23-Mod_SSL_2.8.7-OpenSSL_0.9.6c Windows 2000 Pro SP2 + pre-SP3 updates PHP running as module (php4apache.dll); no CGI MySQL 4.0.1-alpha-win This problem with session variables is a big deal, but there is no warning on the download page for Windows users. [2002-03-18 01:49:39] [EMAIL PROTECTED] FYI: Running Win2K Professional and IIS. PHP running as the php.exe [2002-03-17 16:38:08] [EMAIL PROTECTED] This looks similar to what's posted for 16043. In a nutshell, session variables aren't being stored/updated in v4.1.2. When posting, it may help the PHP developers to provide info such as webserver config (e.g., IIS using PHP CGI, Apache using php4apache.dll, etc.). For example, in BUG#16043, it seemed everyone was using Apache (mostly the latest version, v1.3.23). Both SAPI module CGI version seem to be affected. [2002-03-16 21:35:49] [EMAIL PROTECTED] Here's a pretty simple test case, hopefully it's the same problem: index.php ? session_start(); $_SESSION['testone'] = 1; $_SESSION['testtwo'] = 2; ? html head titleTest Home Page/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo'].'brbr'; ? a href=./test.phpGo to test/a /body /html test.php ? session_start(); ? html head titleUntitled/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo']; ? /body /html Output from index.php: testone = 1 testtwo = 2 and the link Output from test.php after clicking on the link: Warning: Undefined index: testone in c:\htdocs\ebbs\test.php on line 9 testone = Warning: Undefined index: testtwo in c:\htdocs\ebbs\test.php on line 10 testtwo = Hopefully everything is valid, but things had been working fine prior to upgrading to 4.1.2 from 4.1.1. [2002-03-16 00:06:27] [EMAIL PROTECTED] This will be fixed in 4.2.0, probably. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16102 -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: This looks similar to what's posted for 16043. In a nutshell, session variables aren't being stored/updated in v4.1.2. When posting, it may help the PHP developers to provide info such as webserver config (e.g., IIS using PHP CGI, Apache using php4apache.dll, etc.). For example, in BUG#16043, it seemed everyone was using Apache (mostly the latest version, v1.3.23). Both SAPI module CGI version seem to be affected. Previous Comments: [2002-03-16 21:35:49] [EMAIL PROTECTED] Here's a pretty simple test case, hopefully it's the same problem: index.php ? session_start(); $_SESSION['testone'] = 1; $_SESSION['testtwo'] = 2; ? html head titleTest Home Page/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo'].'brbr'; ? a href=./test.phpGo to test/a /body /html test.php ? session_start(); ? html head titleUntitled/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo']; ? /body /html Output from index.php: testone = 1 testtwo = 2 and the link Output from test.php after clicking on the link: Warning: Undefined index: testone in c:\htdocs\ebbs\test.php on line 9 testone = Warning: Undefined index: testtwo in c:\htdocs\ebbs\test.php on line 10 testtwo = Hopefully everything is valid, but things had been working fine prior to upgrading to 4.1.2 from 4.1.1. [2002-03-16 00:06:27] [EMAIL PROTECTED] This will be fixed in 4.2.0, probably. [2002-03-15 23:39:48] [EMAIL PROTECTED] I am having a similar problem. It seems that POST variables are not getting set. It works in 4.1.1, and in the version of 4.1.2 available at http://www.zend.com/zend/week/week77.php, but not in 4.1.2 from http://www.php.net/downloads.php, nor in the version of 4.1.2 available from http://www.php4win.com/builds/latest-build.php. [2002-03-15 14:52:17] [EMAIL PROTECTED] The script below works fine on PHP 4.1.1, but fails on 4.1.2. The script sets two session variables. Only the most recent variable seems to get set, with the previous variable getting reset. -Script- html body ?php session_start(); $varTest1 = ; $varTest2 = ; session_register(TEST1); session_register(TEST2); if (isset($_POST['TEST1'])) { $varTest1 = $_POST['TEST1']; $_SESSION['TEST1'] = $_POST['TEST1']; } if (isset($_POST['TEST2'])) { $varTest2 = $_POST['TEST2']; $_SESSION['TEST2'] = $_POST['TEST2']; } if (!isset($_SESSION['TEST1'])) { $_SESSION['TEST1'] = NOT SET; } if (!isset($_SESSION['TEST2'])) { $_SESSION['TEST2'] = NOT SET; } foreach ($_SESSION as $varKey=$varValue) echo $varKey = $varValue/br; ? form action=sesstest.php method=POST ?php if (isset($_POST['SUBMIT1'])) { ? input type=text value=?php echo $varTest1; ? name=TEST1 input type=SUBMIT name=SUBMIT value=Form1 ?php } else { ? input type=text value=?php echo $varTest2; ? name=TEST2 input type=SUBMIT name=SUBMIT1 value=Form2 ?php } ? /form /body /html --Script End--- The script should be saved as sesstest.php The modules configured are GD and XSLT If you need more information, please contact me. -- Martin -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: FYI: Running Win2K Professional and IIS. PHP running as the php.exe Previous Comments: [2002-03-17 16:38:08] [EMAIL PROTECTED] This looks similar to what's posted for 16043. In a nutshell, session variables aren't being stored/updated in v4.1.2. When posting, it may help the PHP developers to provide info such as webserver config (e.g., IIS using PHP CGI, Apache using php4apache.dll, etc.). For example, in BUG#16043, it seemed everyone was using Apache (mostly the latest version, v1.3.23). Both SAPI module CGI version seem to be affected. [2002-03-16 21:35:49] [EMAIL PROTECTED] Here's a pretty simple test case, hopefully it's the same problem: index.php ? session_start(); $_SESSION['testone'] = 1; $_SESSION['testtwo'] = 2; ? html head titleTest Home Page/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo'].'brbr'; ? a href=./test.phpGo to test/a /body /html test.php ? session_start(); ? html head titleUntitled/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo']; ? /body /html Output from index.php: testone = 1 testtwo = 2 and the link Output from test.php after clicking on the link: Warning: Undefined index: testone in c:\htdocs\ebbs\test.php on line 9 testone = Warning: Undefined index: testtwo in c:\htdocs\ebbs\test.php on line 10 testtwo = Hopefully everything is valid, but things had been working fine prior to upgrading to 4.1.2 from 4.1.1. [2002-03-16 00:06:27] [EMAIL PROTECTED] This will be fixed in 4.2.0, probably. [2002-03-15 23:39:48] [EMAIL PROTECTED] I am having a similar problem. It seems that POST variables are not getting set. It works in 4.1.1, and in the version of 4.1.2 available at http://www.zend.com/zend/week/week77.php, but not in 4.1.2 from http://www.php.net/downloads.php, nor in the version of 4.1.2 available from http://www.php4win.com/builds/latest-build.php. [2002-03-15 14:52:17] [EMAIL PROTECTED] The script below works fine on PHP 4.1.1, but fails on 4.1.2. The script sets two session variables. Only the most recent variable seems to get set, with the previous variable getting reset. -Script- html body ?php session_start(); $varTest1 = ; $varTest2 = ; session_register(TEST1); session_register(TEST2); if (isset($_POST['TEST1'])) { $varTest1 = $_POST['TEST1']; $_SESSION['TEST1'] = $_POST['TEST1']; } if (isset($_POST['TEST2'])) { $varTest2 = $_POST['TEST2']; $_SESSION['TEST2'] = $_POST['TEST2']; } if (!isset($_SESSION['TEST1'])) { $_SESSION['TEST1'] = NOT SET; } if (!isset($_SESSION['TEST2'])) { $_SESSION['TEST2'] = NOT SET; } foreach ($_SESSION as $varKey=$varValue) echo $varKey = $varValue/br; ? form action=sesstest.php method=POST ?php if (isset($_POST['SUBMIT1'])) { ? input type=text value=?php echo $varTest1; ? name=TEST1 input type=SUBMIT name=SUBMIT value=Form1 ?php } else { ? input type=text value=?php echo $varTest2; ? name=TEST2 input type=SUBMIT name=SUBMIT1 value=Form2 ?php } ? /form /body /html --Script End--- The script should be saved as sesstest.php The modules configured are GD and XSLT If you need more information, please contact me. -- Martin -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: Here's a pretty simple test case, hopefully it's the same problem: index.php ? session_start(); $_SESSION['testone'] = 1; $_SESSION['testtwo'] = 2; ? html head titleTest Home Page/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo'].'brbr'; ? a href=./test.phpGo to test/a /body /html test.php ? session_start(); ? html head titleUntitled/title /head body ? echo 'testone = '.$_SESSION['testone'].'br'; echo 'testtwo = '.$_SESSION['testtwo']; ? /body /html Output from index.php: testone = 1 testtwo = 2 and the link Output from test.php after clicking on the link: Warning: Undefined index: testone in c:\htdocs\ebbs\test.php on line 9 testone = Warning: Undefined index: testtwo in c:\htdocs\ebbs\test.php on line 10 testtwo = Hopefully everything is valid, but things had been working fine prior to upgrading to 4.1.2 from 4.1.1. Previous Comments: [2002-03-16 00:06:27] [EMAIL PROTECTED] This will be fixed in 4.2.0, probably. [2002-03-15 23:39:48] [EMAIL PROTECTED] I am having a similar problem. It seems that POST variables are not getting set. It works in 4.1.1, and in the version of 4.1.2 available at http://www.zend.com/zend/week/week77.php, but not in 4.1.2 from http://www.php.net/downloads.php, nor in the version of 4.1.2 available from http://www.php4win.com/builds/latest-build.php. [2002-03-15 14:52:17] [EMAIL PROTECTED] The script below works fine on PHP 4.1.1, but fails on 4.1.2. The script sets two session variables. Only the most recent variable seems to get set, with the previous variable getting reset. -Script- html body ?php session_start(); $varTest1 = ; $varTest2 = ; session_register(TEST1); session_register(TEST2); if (isset($_POST['TEST1'])) { $varTest1 = $_POST['TEST1']; $_SESSION['TEST1'] = $_POST['TEST1']; } if (isset($_POST['TEST2'])) { $varTest2 = $_POST['TEST2']; $_SESSION['TEST2'] = $_POST['TEST2']; } if (!isset($_SESSION['TEST1'])) { $_SESSION['TEST1'] = NOT SET; } if (!isset($_SESSION['TEST2'])) { $_SESSION['TEST2'] = NOT SET; } foreach ($_SESSION as $varKey=$varValue) echo $varKey = $varValue/br; ? form action=sesstest.php method=POST ?php if (isset($_POST['SUBMIT1'])) { ? input type=text value=?php echo $varTest1; ? name=TEST1 input type=SUBMIT name=SUBMIT value=Form1 ?php } else { ? input type=text value=?php echo $varTest2; ? name=TEST2 input type=SUBMIT name=SUBMIT1 value=Form2 ?php } ? /form /body /html --Script End--- The script should be saved as sesstest.php The modules configured are GD and XSLT If you need more information, please contact me. -- Martin -- Edit this bug report at http://bugs.php.net/?id=16102edit=1
Bug #16102 Updated: 1 session variables not getting set correctly
ID: 16102 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Analyzed Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: This will be fixed in 4.2.0, probably. Previous Comments: [2002-03-15 23:39:48] [EMAIL PROTECTED] I am having a similar problem. It seems that POST variables are not getting set. It works in 4.1.1, and in the version of 4.1.2 available at http://www.zend.com/zend/week/week77.php, but not in 4.1.2 from http://www.php.net/downloads.php, nor in the version of 4.1.2 available from http://www.php4win.com/builds/latest-build.php. [2002-03-15 14:52:17] [EMAIL PROTECTED] The script below works fine on PHP 4.1.1, but fails on 4.1.2. The script sets two session variables. Only the most recent variable seems to get set, with the previous variable getting reset. -Script- html body ?php session_start(); $varTest1 = ; $varTest2 = ; session_register(TEST1); session_register(TEST2); if (isset($_POST['TEST1'])) { $varTest1 = $_POST['TEST1']; $_SESSION['TEST1'] = $_POST['TEST1']; } if (isset($_POST['TEST2'])) { $varTest2 = $_POST['TEST2']; $_SESSION['TEST2'] = $_POST['TEST2']; } if (!isset($_SESSION['TEST1'])) { $_SESSION['TEST1'] = NOT SET; } if (!isset($_SESSION['TEST2'])) { $_SESSION['TEST2'] = NOT SET; } foreach ($_SESSION as $varKey=$varValue) echo $varKey = $varValue/br; ? form action=sesstest.php method=POST ?php if (isset($_POST['SUBMIT1'])) { ? input type=text value=?php echo $varTest1; ? name=TEST1 input type=SUBMIT name=SUBMIT value=Form1 ?php } else { ? input type=text value=?php echo $varTest2; ? name=TEST2 input type=SUBMIT name=SUBMIT1 value=Form2 ?php } ? /form /body /html --Script End--- The script should be saved as sesstest.php The modules configured are GD and XSLT If you need more information, please contact me. -- Martin -- Edit this bug report at http://bugs.php.net/?id=16102edit=1