[thelist] php hosting trouble

Maximillian Schwanekamp lists at neptunewebworks.com
Wed Aug 24 17:42:23 CDT 2005

super super wrote:
> i have used about 10 differnet hosting company for different clients, but this one was the first for me,
> they required all php pages to have the code below..
> #!/usr/local/bin/php 

That's usually because PHP is compiled as CGI and the server has not 
been set to use /usr/local/bin/php as the default handler for .php 
files.  Save yourself the pain - get a different host, preferably one 
that has a clue.  That said, if the server software is Apache, you might 
be able to use something like the following in .htaccess to put a 
bandaid on the problem:
Action php-script /usr/local/bin/php
AddHandler php-script .php

But then again, a host that doesn't have a handler set for the .php 
extension is probably not a host to run a php site on...
Max Schwanekamp

More information about the thelist mailing list