Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POST variables getting mangled

Status
Not open for further replies.

pgosse

Programmer
Sep 26, 2001
42
CA
Hi all. I'm relatively new to administering Apache, and I've come up against a problem which is very strange.

I'm running Apache 2.0 on a Dell Precision 340 with RedHat 9.0.

I'm developing a CMS, and for some reason post data is at times getting mangled during the post process.

The example below extracts the problem from the CMS and replicates it perfectly, telling me that the problem is not related to any code in my CMS, but rather is something in how I've got Apache configured.

In addition, the result is slightly different depending on the browser used.

I have a simple form like this:

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
<head>
<title>UNBC Content Management System</title>
</head>
<body>
<form action=&quot;foo.php&quot; method=&quot;post&quot;>
<textarea name=&quot;description&quot; class=&quot;textinput&quot; style=&quot;width:740px&quot; rows=&quot;40&quot; wrap=&quot;off&quot;>

</textarea>
<input type=&quot;submit&quot;>
</form>
</body>
</html>

and in bar.php I have:

Code:
<?php
print_r($_POST);
?>

An example of the code being input to the form can be had here:


and an example of the mangled output can be seen here:


As you can see the code is ruined towards the end, with part of the original code being appended to the end of itself. The amount of code appended to the end depends on which browser you try it in (I've tried IE 6.0, Mozilla 1.2.1 and Konqueror).

Does anyone have any idea what could be causing this? I'm thinking it has to be something with Apache since I've removed the code from my CMS and the problem remains, and it appears in multiple browsers. Also, since on the receiving page I'm doing nothing but printing the post data to the screen, this makes no sense at all.

Can anyone give me any advice here? I'm completely stuck on this one.

Cheers and thanks much in advance,

Pablo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top