Click to See Complete Forum and Search --> : PHP scripts embedded in HTML not working


Anon
01-30-2002, 03:27 PM
Hi,

I dont know what is going on with my server here. I am running PHP4 on an apache server on my local machine. When I name a file with a .php extension all works well, the PHP is parsed. However when I attempt to embed PHP into HTML with the following tags <?php ?>, the php is not parsed. Below is the configuration file for apache, where php is set up

////////////////////////////////

LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php4 .php4

ScriptAlias /php4/ "C:/php/"
#AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php4 .phtml
Action application/x-httpd-php4 "C:/php/php.exe"


////////////////////////////////

Please offer my advise on what is the problem, as i am at a complete loss at the moment.

Thanks in advance for assistance.
Tony.

Anon
01-30-2002, 04:37 PM
If you want html-files to be parsed, add something like:

AddType application/x-httpd-php4 .html

otherwise Apache just sends the files out without letting php.exe get a grip on them.
Best regards,


King Louie