SMF showing content encoding error
Well, this isn’t really specific to 000webhost.com, you might run into this error with a lot of different hosts, especially free ones. It all started with an user reporting that his SMF forum, hosted at 000webhost, did not work properly. Instead of displaying the forum page all i got was an error message in Firefox which was along the lines of
[su_note note_color=”#cdd3e7″]Content Encoding Error The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Please contact the website owners to inform them of this problem.[/su_note]
Had a quick look at the user account and SMF install on the website but couldn’t find anything suspicious. Next step was to use SMF’s repair_settings.php file which basically lets you edit the entire SMF configuration (though with some of the options available you should at least have a rough clue of what the settings you are about to edit do). Looking at the info displayed when opening http://domain.com/forums/repair_settings.php i noticed that output compression was enabled. I unticked the box for output compression, saved the changes et voila…the forum started working immediately.
So if you run into the same problem and see a content encoding error when trying to access your SMF forum then this is a possible solution to try (and chances are that exactly this is what you need to do). Seems like output compression confuses some hosts (free ones in particular).
- Grab a copy of repair_settings.php from http://wiki.simplemachines.org/smf/Repair_settings.php
- Upload the file to your forum directory (the same directory where settings.php is located)
- Open the file in your browser (http://yourdomain.com/repair_settings.php if your forum is located in the root directory, or http://yourdomain.com/forum/repair_settings.php if your forum is located in a folder called “forum”.
- Untick the checkbox for output_compression
- Scroll down to the bottom of the page and save the changes
- Check if your forum works now
- If it does then delete the repair_settings.php file (do NOT forget to delete it, it does display sensitive data like your MySQL details for example