#35642 [Opn]: POST var corrupted when single variable posted
| From: | ray at wirestorm dot net | Date: | Mon, 12 Dec 2005 11:25:31 +0000 |
| Subject: | #35642 [Opn]: POST var corrupted when single variable posted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-90272@lists.php.net to get a copy of this message | ||
ID: 35642
User updated by: ray at wirestorm dot net
Reported By: ray at wirestorm dot net
Status: Open
Bug Type: Apache2 related
Operating System: Debian Linux
PHP Version: 5.1.1
New Comment:
Additionally, this is when the filter is configured as:
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
This is the ONLY reference to php (except for the DirectoryIndex and
LoadModule directives) in my apache2 config, therefore I do not beleive
that the two types of php configuration are conflicting.
Replacing this with:
AddType application/x-httpd-php .php
Works, so presumably its an issue with PHP + Apache2 Filters? I have
had to change my server to use the AddType directive to get things
working, so the example script on n0de.net now works.
Previous Comments:
------------------------------------------------------------------------
[2005-12-12 11:57:43] ray at wirestorm dot net
Description:
------------
Apache2 Filter + PHP 5.1.1
When posting a SINGLE post var, the post var appears corrupted, (the
raw post data, it seems, is appended to the end of the value).
When posting multiple post vars, the problem does not appear.
here is my config settings:
'./configure' '--with-xml' '--with-layout=GNU'
'--with-config-file-path=/etc/php5'
'--with-config-file-scan-path=/etc/php5' '--with-sockets'
'--with-mbstring' '--enable-exif' '--enable-xslti'
'--prefix=/usr'
'--with-xsl' '--with-dom' '--with-mysql=/usr/local'
'--with-zlib'
'--with-bzip' '--with-gd' '--enable-shared-pdflib'
'--with-gettext'
'--enable-mailparse' '--with-curl=/usr' '--enable-exif'
'--with-jpeg-dir=/usr/lib/' '--with-png-dir=/usr/lib/'
'--with-ttf=/usr/lib/libttf.so' '--enable-gd-native-ttf'
'--with-xpm-dir=/usr/' '--enable-apc' '--enable-apd'
'--with-mcrypt'
'--with-mhash' '--enable-soap' '--with-apxs2filter=/usr/bin/apxs2'
And a test script is here: http://n0de.net/php-test/
Additionally, a simple perl script doing the same thing produces the
CORRECT result (ie, no post var corruption).
Reproduce code:
---------------
<?
var_dump($_POST);
?>
<form action='.' method='post'>
<textarea name='cmd'></textarea>
<input type='submit' />
</form>
Expected result:
----------------
array(1) {
["cmd"]=>
string(16) "sdfsdf"
}
Actual result:
--------------
array(1) {
["cmd"]=>
string(16) "sdfsdfcmd=sdfsdf"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35642&edit=1