Uploading files with HTTP -> error 406 : Not Acceptable

Status
Not open for further replies.

similitux

New Member
Messages
17
Reaction score
0
Points
0
Hello!

I have a problem with uploading files:

I did an Amarok Script (written in Ruby) wich uploads the cover of the currently playing song. But my PHP script (wich works with the uploaded cover) fails since today (it worked well before) and returns the HTTP error code 406 - Content not acceptable by the client. I tried to make the PHP script blank (it does nothing with $FILES and echoes nothing) and I get the same error code. If I don't upload any file, the script works well.

I tried to make a webpage that uses a <form method="post" ENCTYPE="multipart/form-data" action="..."> and it works fine under Firefox.

So my question is: did you strengthen restrictions on file uploads that made my script fail (the multipart file sending is made by a thirdparty lib)... ?

Thanks.

edit: I forgot to say I have an intermediate php config and my account is not suspended (similitux.exofire.net - user: jbell)
 
Last edited:

similitux

New Member
Messages
17
Reaction score
0
Points
0
I solved the problem by myself, by following this article: http://www.skyminds.net/2006/12/05/resoudre-lerreur-http-406-not-acceptable/ . The 406 errors are due to Apache security restrictions.

You just have to place a .htaccess file in the directory of your 406-making-script, and fill it with:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

It disables the concerned security restrictions for the directory, so don't place it everywhere nor at your root directory...

Many thanks for hosting, this offer is awsome, I have everything I want!

Jany.
 
Status
Not open for further replies.
Top