[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

POST data being mangled during POST operations under Apache

Posted on 2003-11-26
3
Medium Priority
?
258 Views
Last Modified: 2010-04-20
Hi everyone.  I'm offering up 500 points for this one as it's got me completely and utterly stumped, and I need a solution.  I'm going to be very stringent in awarding these points, as the solution must work completely.  First person to solve it completely gets 500 points.

This is the situation:

I'm running Apache 2.0 with PHP 4.2.2 on a Dell Precision 340 running RedHat 9.

I've been writing a Content Management System for some time now, and I've recently noticed something strange happening, and it's only happened since I moved development of the CMS from a temporary server to my workstation (temporarily until a permanent home for the CMS is acquired here).

At times when I'm attempting to update data within the CMS (say, a stylesheet snippet, content block, etc.) when I submit the form the POST operation mangles the code.

That is to say, it's taking some of the original code, and appending it to the end of the complete block of the original code.

Here's an example of the good input:  http://web.unbc.ca/~gossep/good_code.txt

And here's an example of the garbage output:  http://web.unbc.ca/~gossep/bad_code.txt

Additionally, the mangling of the code is slightly different depending on which browser you try this with.

As you can see, part of the POSTed code has been appended to the end of the original code.  This is not happening with all code, but only with certain snippets.  The one common thing I've been able to pinpoint it to is perhaps the length of the code segment in question.  I unfortunately do not have time to built a POSTed piece of code one character at a time to figure out if this is indeed the case.

Additionally, this seems to also happen with images that are uploaded via the CMS as well.

To see how it mangles some of the images, please view the images at http://web.unbc.ca/~gossep/sample_images/.  The images which were mangled are named [filename]_uploaded.ext so you can see the originals and the mangled images.

My initial thoughts were that it must be something in my code, but that's simply not the case.  For both text posts and image uploads I created bare-bones forms (nothing more than the form tags, a textarea and submit button for the former, and the form tags, file input and upload button for the latter) and on my machine the problem still occurs but on others it does not.

I'm not overly concerened that this will be a problem in the long run, since the CMS will be going to its permanent home within the next couple of months, and I've run a number of tests on other workstations and these problems do not occur.

However, right now it's proving very difficult for me in development, since I will often need to make changes to a template or other code chunk, in which case I need to copy the code from the CMS to notepad (the CMS requires IE5.5 so I'm accessing it via our tss box) escape all necessary characters and then copy it into a manual sql query.

I look forward to replies to this problem.

GOOD LUCK!

Cheers,
Pablo Gosse
0
Comment
Question by:pablogosse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
JClawson earned 2000 total points
ID: 10806430
That is quite a strange problem... .Assuming your code is correct, it sounds like somthing is wrong in either apache or PHP.  Perhaps a file was somhow corrupted... who knows.  First I would suggest updating PHP to 4.3.5 or 4.3.6.  Hopefully this will fix it.  If that doesn't work ty reinstalling apache... or vice-versa.  I imagine a fresh reinstall should fix it.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question