Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Mangled Post Data?!?! - HELP!


Recommended Posts

I have a very weird situation.


When entering product attributes, my post data is being lost. For instance,


I enter a new product option called say "Test Attribute" and click insert. When the page_attributes page processes the post data, what I'm left with is "t Attribute". The same thing happens when I enter the product attribute types, such as if I add types of "Test Attribtes", small, medium, large. They too get left trimmed for no apparent reason. I can get around this by entering a space or two at the beginning of the first word I'm entering, then it goes without a hitch, however.. the spaces get saved and when I attach a given attribute that has a space at the beginning of the name, then when I "add an item to cart" and go to my cart, when I try to remove the item from the cart it won't remove it! It's stuck in my cart. The only way to get it out is to close the browser completely.


Now here are some debugging specifics. On our development machine, everything works perfect. No problems. But on our production server is where this is happening.



Development Server Configuration:


Op. Sys: Mandrake Linux 9.0

Webserver: Apache-AdvancedExtranetServer/1.3.26

PHP Version: 4.2.3

MySQL Version: 3.23.52


Production Server Configuration:


Op. Sys. Raq4 Cobalt

WebServer: Apache/1.3.20

PHP Version: 4.2.3

MySQL Version: 3.23.37



I spent some time using the Zend Debugger and here is what I have found. The data from the post is mangled before the product_attributes.php page ever touches it. I break at the beginning of my prepend.php page, the HTTP_POST_VARS data is already mangled. I changed the form action from POST to GET and here is the actual URL when sending as a GET:




Now... the interesting thing to note is that if I pause execution of the page, change the %5D to the ']' character and the %5B to the '[' character which is what the product_attributes.php is expecting it to be, and refresh so that the URL looks like this:




Then the data is completely correct and the page processes correctly.


Please note this issue ONLY exists on our production server. The PHP.ini files are identical on both machines. The configuration of TEP is identical on both machines as is the actual page code for all pages. The data in the databases are identical.


Has anyone had any similiar problems? If so has anyone found a fix??? What I'd LIKE to do is set it so that the post data doesn't get changed.. for instance, the data stays as option_name[1]= instead of option_name%5B1%5D. If I could do this then my problem would go away. Anyone know what changes the post data, or how to turn that off?? Is this possible and if so, are there any issues caused by doing this? Any other thoughs as to what I could do to fix this?!?!? Thanks for any information you could provide.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...