Click to See Complete Forum and Search --> : php in html


kamurj
05-16-2003, 02:56 PM
ok, i went with hostway's dedicated linux server. problem is i desperatly need to have php code executed inside my html files. me or hostway support just can't do this despite tring everything.

me php configuration can be viewed @ http://enotalonecom.siteprotect.net/info.php

php is installed as cgi under linux, apache, php version number 4.3.1
Trying to solve the problem by adding

AddType application/x-httpd-php .php .html
AddHandler php-script html

or
AddType application/x-httpd-php .php .php3 .html

to my .htaccess or .httpd does not work

my old shared hosting at affinity is able to do this my putting simple .htaccess file. there i had php under solaris, unix, under apache, as cgi, php 4.0.6 i think (see http://enotalone.com/info.php), but the new server is just impossible.

I would really appreciate any help. thanks. arman

tsinka
05-16-2003, 03:59 PM
Hi,

did you try to put a .htaccess file in the directory with just the following line in it ?

AddHandler cgi-script .html

I'm not sure but additionally you might need to add a shebang line at the top of your html files

#!/usr/bin/php
(the path to the php executable).

Thomas