Why my site was hosed

Thursday 30 December 2004

I finally (!!) heard from my old hosting provider about why my site was hosed. To help with security, he installed PHPsuexec. He says it is incompatible with this line in my .htaccess file which lets me serve .html URLs but have PHP code in them:

# Treat .html files as PHP
AddType application/x-httpd-php .html

I did find other tips on the web that said this might be a problem with PHPsuexec, but this thread from the textpattern support forum seems to imply that this is solvable. (Note how I keep bumping into those textpattern guys..) I don't care to solve the problem with my old host, but I get the feeling PHPsuexec may be in my future in any case, so I'm interested if there is other information out there about it.

Update: JumpDomain fixed my old site, by changing the line above to:

# Treat .html files as PHP
AddHandler application/x-httpd-php .php .php3 .phtml .html .htm .php4

Comments

[gravatar]
Kevin 6:08 PM on 30 Dec 2004

PHP shouldn't get anywhere near that, no matter how it's configured. At least in theory :-)

AddType is a function of mod_mime which means you need the FileInfo override enabled for your directory, and that can only be done by the admin.

At a guess I'd say someone was trying to make the server more secure and they disabled FileInfo overrides, which are actually pretty harmlesss all things considered. If you have custom error pages then this would also hose them. It's harmless and easy so it might be worth bugging someone a little about it.

[gravatar]
William 2:14 AM on 2 Jul 2006

Addhandler work in .htaccess?

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.