[wp-testers] Unable to Upload

Philip Barron delcyphr at gmail.com
Thu Mar 27 13:54:31 GMT 2008


Andy wrote:

>If this were conditional and specifically directed at the flash upload
>target file it could be a very nice thing to add to .htaccess where we
>can. Here is a first attempt:

><IfModule mod_security.c>
>SecFilterSelective "REQUEST_URI" "wp-admin/async-upload.php" "allow,nolog"
></IfModule>

Anyone on Apache experiencing HTTP upload errors not resolved by
removing plugins, please add that to your .htaccess file and report
the results here.

Andy, my server has mod_security enabled (Apache version: 1.3.37, Unix). Using
you suggestion as written in .htaccess borked my blog with a 500
Internal Server
Error. I removed the IfModule tags and applied just this to .htaccess:

SecFilterSelective "REQUEST_URI" "wp-admin/async-upload.php" "allow,nolog"

The blog loaded normally, but attempting to upload using Firefox/Windows failed
with this 406 error message:

HTTP Error.
An error occurred in the upload. Please try again later.

(Image uploading using Firefox/Mac succeeded with the error message
"File failed specified test.")

I had earlier suggested here a different .htaccess addition which I found while
searching the Web. This is intended to get mod_security to ignore the
problematic
Flash header.

<IfModule mod_security.c>
SetEnvIfNoCase Content-Type \
"^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
</IfModule>

<IfModule mod_gzip.c>
mod_gzip_on No
</IfModule>

It worked. Image uploading using Firefox/Windows succeeded with no errors.
Using Firefox/Mac succeeded with the "File failed specified test" message.

As I said earlier, I haven't tested this using other browers.

all best,
phil


More information about the wp-testers mailing list