PHP in htm problem

Posted by HWLJr, 03-04-2010, 07:59 PM
I have a Blue Quartz server which seems to run htm, html and php pages just fine. I can call a test.php report up no problem too from domains and subs. However, I cannot embed a php statement in an htm page. example from an htm page:
March 22, 2010
this does not work - no Hello shows up. I might add that when I added the code the first time, it worked for about 5 minutes! Thank you for any advice.

Posted by RS Shamil, 03-04-2010, 08:11 PM
Try: Notice the semicolon, delimiter.

Posted by _mediapig_, 03-04-2010, 08:21 PM
I believe if memory serves me correctly that the Page would have to be saved as a .php file for the php to be parsed by the php server. Unless you have configured php to parse .htm and .html files, which I dont think it is set to do by default.

Posted by HWLJr, 03-04-2010, 09:05 PM
and tried this but this did not work - pardon my lack of knowledge - how/where can I configure the php to parse as you suggest? Thanks

Posted by jweeb, 03-04-2010, 09:11 PM
Did you save the file as a php file?

Posted by FrankLaszlo, 03-04-2010, 09:15 PM
Most hosting companies are only setup to parse files ending with the '.php' extension through the php interpreter. You can override this default behavior by adding something like this to the sites .htaccess: This may or may not work depending on how your server is configured.

Posted by HWLJr, 03-04-2010, 09:16 PM
That works! I'll continue testing... thank you

Posted by HWLJr, 03-04-2010, 09:19 PM
I'll try that too as I have none now. Thanks

Was this answer helpful?

 Print this Article

Also Read

How can I redirect all traffic which is NOT on a mobile device?

Posted by Chris`, 01-06-2008, 07:44 AMHey WHT! I have another question. I've finally got a...

Activity on Ports 1028 and 135

Posted by FFCus, 01-14-2008, 12:54 AMUsing Active Ports, my Windows 2003 server is showing a very...

Multiple IP's Ubuntu

Posted by jamiew8, 02-10-2011, 07:12 AMHi, I have been trying to add multiple IP's for SSL...

Vps and Nameservers

Posted by ASTRAPI, 04-20-2009, 03:03 PMHello If i create a vps using openvz and use a new ip...

How can I get the memory offsets that functions in a dll access?

Posted by lJesterl, 02-11-2011, 11:57 PMI am developing an anti cheat patch for a friend for an...