tags:

views:

20

answers:

1

I am experiencing a maddening issue with PHP that I can't seem to resolve. In some cases when a form is posted with a text area or text field and I am also using multi-dimensional arrays for the form field ids (e.g. name="blah[id][5]") the text that was posted in the text area or text field gets mysteriously truncated by PHP at 256 characters with ...cut... at the end of the string. It's definitely happening after the POST, before any other processing and before it's written to the database. I can't find any reference to ...cut... within the PHP source code and we're still unable to reliably reproduce the error. It does not happen all the time. Has anyone encountered this maddening little beast before? We're using Apache 2 and PHP 5.2.6 on CentOS.

+1  A: 

Check $HTTP_POST_RAW and/or php://input on the server to see if those are affected as well, and then use something like HTTPFox (in the Mozilla addons repository) to see what's getting sent out on the wire from the client.

As well, see if something like mod_security is active in Apache, which can also re-write data long before it gets anywhere near PHP.

Marc B