ID: 19263
Comment by: josantri at hotmail dot com
Reported By: erwin at isiz dot com
Status: Bogus
Bug Type: Apache2 related
Operating System: Solaris 8
PHP Version: 4CVS-2002-09-06
New Comment:
Same experience with RedHat 7.3, Apache 2.0.45 & PHP 4.3.1.
The solution was disabling MIME type for PHP (I don't see new problems
by now with this issue):
#AddType application/x-httpd-php .php
And now, leaving enabled filtering method, but be care with above
example or you get a 'Syntax error [...]:
AddInputFilter requires at least two arguments, input filter name (or ;
delimited names) followed by one or more file extensions' when Apache2
is restarted. The code we use is:
<Files *.php>
AddInputFilter PHP .php
AddOutputFilter PHP .php
</Files>
(Note the field naming the extension.)
I'm not sure how enable filtering for *php.*, because AddInputFilter
and AddOutputFilter seems not to accept wildcards on extensions (in
files section definition is fine). Probably, independent definitions
for each extension will work as well.
Thanks to all of the above for help provided.
Previous Comments:
------------------------------------------------------------------------
[2003-07-01 02:35:35] php at gijs dot triple-it dot nl
Hi,
On my configuration (RedHat 9.0, Apache 2.0.40, php-4.2.2), I had to
remove one of the following from the conf/httpd.conf or the
/conf.d/php.conf
AddType application/x-httpd-php .php4 .php3 .phtml .php
Or
<Files *.php*>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 10240000
</Files>
Either of these functions will work, but together they screw up and
create the problem as reported above.
Good Luck!
Gijs Zonneveld
------------------------------------------------------------------------
[2003-06-23 10:11:32] jan at smartbit dot be
The bug also occurs on RedHat 9.0 - Apache 2.0.40 - PHP 4.3.2
Uploaded jpg files get corrupted (filesize incorrect)
Other filetypes (gif, png) works fine...
------------------------------------------------------------------------
[2003-05-28 20:40:37] webmaster at webtechina dot com
this bug also occurs on Redhat Linux 8.0 with Apache 2
------------------------------------------------------------------------
[2003-03-12 16:57:17] nvainio+phpnet at iki dot fi
For me, the solution was to leave SetOutputFilter and SetInputFilter
as-is and comment out AddType application/x-httpd-php .php instead.
Can't say why but it works for me (Apache 2.0.44 and PHP 4.3.1).
------------------------------------------------------------------------
[2003-01-08 14:21:36] colreid at zasx dot com
People are asking me what I did, so here it is:
My Apache2 package has a directory which it uses for included files
with httpd.conf (the path to this directory in my installation is
/etc/httpd/conf.d).
In there is a file called php.conf, and basically I just commented out
the whole thing except for one line:
LoadModule php4_module modules/libphp4.so
This section here:
#<Files *.php>
# SetOutputFilter PHP
# SetInputFilter PHP
# LimitRequestBody 524288
#</Files>
liked to munge uploads.
Also, in the httpd.conf file I added the line:
AddType application/x-httpd-php .php .html .htm .inc
And that's it. I restarted apache and uploads decided to be nice. :)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19263
--
Edit this bug report at http://bugs.php.net/?id=19263&edit=1