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>
<title>Test Home Page</title>
</head>
<body>
<?
echo 'testone = '.$_SESSION['testone'].'<br>';
echo 'testtwo = '.$_SESSION['testtwo'].'<br><br>';
?>
<a href="./test.php">Go to test</a>
</body>
</html>


test.php

<? session_start(); ?>
<html>
<head>
<title>Untitled</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=16102&edit=1

Reply via email to