File Uploads Generate HTTP Error 406

Summary

This is caused by particularly aggressive security configurations by web hosting companies for Apache’s mod_security module. This issue is not limited to affecting Shopp but also, any other scripts that handle file transfers.

Troubleshooting

A workaround is available that disables post buffering for multipart forms. This is ideal because it disables the issue causing problems with your browser and the server, but maintains the web hosting security configuration. To accomplish this, add the following lines to your .htaccess file at the root of your website (or WordPress install):

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

Editing the .htaccess file
The .htaccess (HyperText access) file is a special file for the Apache web server that acts as a site-specific configuration file. Configuration directives are added to .htaccess files that are placed in a particular directory. Any directives within the file are applied to that directory and any sub-directories of that directory.

WordPress primarily makes use of the .htaccess file to handle URL rewriting to support pretty urls. There are several WordPress plugins that also make use of the .htaccess file.

To edit the .htaccess file on a remote web site, you will need to access your website either using FTP software, or using the command-line over an SSH connection. If you’re able to use SSH, you don’t need a guide on how to edit the file, so this mini-guide will focus on FTP editing.

First, connect to your website with your FTP software. Your FTP software (also known as a client) will need to be configured to view hidden/system files. In the Unix world, any filename preceded with a . (dot) becomes hidden and are typically known as dotfiles. Each FTP client is different, so to figure out how to view hidden files, refer to the FTP software’s help files, documentation or do a search on the web.

Once enabled, you can now download, make changes to the file in a text editor, save them and upload your changes back to the server.

See Also

File Uploads Generate HTTP Error 406
  • 0.00 / 5 5

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar