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

Bob Sneidar bobsneidar at iotecdigital.com
Wed Dec 23 17:16:14 EST 2015


It's OK! We all have moments of doubt. It's good that you can express it here. ;-)

Bob S


> On Dec 23, 2015, at 11:59 , Peter Haworth <pete at lcsql.com> wrote:
> 
> Thanks Mark.  Did you mean "It might be insecure" :-)
> 
> 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:25 AM, Mark Schonewille <
> m.schonewille at economy-x-talk.com> wrote:
> 
>> Hi Peter,
>> 
>> I have the following at the end of my php.conf file:
>> 
>> # PHP5 module
>> LoadModule php5_module "c:/php/php5apache2_2.dll"
>> AddType application/x-httpd-php .php .htx .htm .html
>> PHPIniDir "C:/php"
>> 
>> I added .htm and .html for testing. This works. I don't recommend using
>> this approach. I might be insecure.
>> 
>> Kind regards,
>> 
>> Mark Schonewille
>> http://economy-x-talk.com
>> https://www.facebook.com/marksch
>> 
>> Buy the most extensive book on the
>> LiveCode language:
>> http://livecodebeginner.economy-x-talk.com
>> 
>> Op 12/23/2015 om 19:03 schreef Peter Haworth:
>> 
>>> 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>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list