[OT] Configure web server to parse php in .html files

Peter Haworth pete at lcsql.com
Wed Dec 23 17:27:34 EST 2015


Thanks for the xbithack link. I'd come to the conclusion that it's not
possible to enable SSI and php parsing via the .htaccess file for one
website.  I've replaced my SSI commands with simple php include scripts and
all seems to be working.  But I'll check out the link.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Wed, Dec 23, 2015 at 10:22 AM, Peter Haworth <pete at lcsql.com> wrote:

> Update on this.
>
> Just got an email from Dreamhost support to use:
>
> AddHandler fcgid-script .html
> FCGIWrapper "/dh/cgi-system/php55.cgi" .html
>
> That does indeed work.  However I also need to enable SSI in html files
> with "AddHandler server-parsed .html" and if that line is in there, the php
> isn;t parsed.
>
> So now I guess the question is how to get both php and ssi parsed in html
> files.
>
>
>
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
>
> On Wed, Dec 23, 2015 at 10:03 AM, Peter Haworth <pete at lcsql.com> wrote:
>
>> I've just finished my first php script that needs to be embedded in a
>> file with a .html extension.  The php script is in a file referenced with a
>> php require command in the .html file.
>>
>> The script does not run when the web page is loaded unless I change the
>> file extension to .php.
>>
>> I believe there are directives that can be put into my .htaccess file to
>> should cause files with a .html extension to be parsed for php,  I've tried
>> the following directives I found on the web and none of them work:
>>
>> AddHandler x-httpd-php .html .htm
>>
>> AddHandler php-script .php .html .htm
>>
>> AddHandler php5-script .php .html .htm
>>
>> AddType application/x-httpd-php .htm
>> AddType application/x-httpd-php .html
>>
>> The last two of the above caused any url for a page on my website to
>> start a download (using Chrome).
>>
>> Anyone have the correct directive?
>>
>> Pete
>> lcSQL Software <http://www.lcsql.com>
>> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
>> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
>>
>
>



More information about the use-livecode mailing list