Posted on
A client using Hostmonster was doing some hair-pulling over what appeared to be a .htaccess problem while installing a Symphony site I developed. We thought it might be related to the fact it was running on a subdomain.
The server would give a blank page, and on the HTML source would show something like “500 SHTML wrapper”.
It turns out this happens when group write permissions are set on the script. Via the Hostmonster Cpanel File Manager, you can right-click the file, click permissions and uncheck “write” and the script should run.
The way I worked this out was: first, rename .htaccess to something like _htaccess, so we know that’s not getting in the way.
Next try viewing a file like favicon.ico (this was served correctly). Then upload a simple PHP script like phpinfo.php, with contents:
<?php phpinfo(); ?>
When I did this I was still getting the 500 error. I found in a Hostmonster forum someone had mentioned group write permissions, which I started experimenting with until it worked.
Posted on
Find all files (not directories) and remove the eXecutable bit. I don’t know what the characters on the end do:
find . -type f -exec chmod a-x {} \;
Make all directories executable to user, read/writable to groups others (good for when the web server is in ‘others’):
find . -type d -exec chmod 755 {} \;
Make all files read/write/executable for user, readable for the group and others:
find . -type f -exec chmod 644 {} \;