Subject: POST data disappearing

From: Jim Serio <[email-masked]>
Date: Wed, 25 Feb 2004 21:34:12 -0700

Hi All.

I have the following setup:

Apache/1.3.27 (Unix) - Linux
mod_ssl/2.8.14 (using mm)
OpenSSL/0.9.6b
PHP/4.3.1

SSL and non-SSL sites are running on the same instance of Apache.

While working on a PHP-based form I noticed that on random occasions POSTed 
data will completely disappear.. as if it was the first time the user 
visited the page. After days of trying to resolve the issue, I ended up 
just writing a simple form (see below). It was still intermittent though 
but I began to notice a pattern. If I uploaded the file (overwriting it) 
then the POST data disappeared. BTW.. this was on the SSL-enabled virtual 
host. When tested on the non-SSL-enabled virtual host (running under the 
same instance of Apache) I did not run into the problem. I also tested out 
previous scripts on the SSL-enabled host and, to my shock, discovered the 
same problem!

Tonight I have finally been able to re-create the problem. I can submit 
data into the form (the test form below just posts to itself and displays 
the posted data, along with the POST array) numerous times and the data 
will remain the same or change if I change it. However, if I "touch" the 
file or overwrite it, the next time I submit the form, the POST data is 
gone. Nothing. Ziltch. I can consistently duplicate this on the SSL-enabled 
host but it never happens on the non-SSL-enabled host, leaving me to 
believe it may be a problem with mod_ssl or some program it's compiled 
against (mm, perhaps?). I looked into any cache options but the only one, 
SSLSessionCache, is not set, so I assume it's set to the default: none.

Has anyone encountered this problem and have a solution?

Below is a sample script which exhibits the problem. You can test it by 
following the steps:

First fill out the form and sumbit. Wait about a minute and either 'touch 
debug.php' or overwrite it. Then resubmit and everything will clear out. 
I'd appreciate it if some of you could test this and see if you get the 
same result.

-----BEGIN debug.php-----
<?php

// Start a user session
session_start();

print_r($_POST);

?>

<!--<html>
<head>
<title>Debug</title>
</head>

<body>

<form method="POST">
<input type="hidden" name="submit" value="1">

First Name: <input type="text" name ="first_name" size="16" maxlength="32" 
value="<?php if ($first_name != "") { echo($first_name); } ?>"><br>
Last Name: <input type="text" name ="last_name" size="16" maxlength="32" 
value="<?php if ($last_name != "") { echo($last_name); } ?>"><br>
Phone: <input type="text" name ="phone" size="16" maxlength="32" 
value="<?php if ($phone != "") { echo($phone); } ?>"><br>
Fax: <input type="text" name ="fax" size="16" maxlength="32" lue="<?php if 
($fax != "") { echo($fax); } ?>"><p>

<input type="submit">

</body>

</html>-->
-----END debug.php-----

Jim

--
Jim Serio - [email-masked] 

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]