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 to do this with a cronjob?

Posted by HD Fanatic, 07-13-2007, 04:18 PMI want to copy a sql file from my secondary hdd to my...

[HELP]Need Script for manual Cookie Deleting

Posted by kohkindachi, 09-12-2008, 09:37 AMHey guys, I need a few codings(php; javascript or etc)...

Simple Apache problem

Posted by Jinovich, 03-28-2008, 10:26 AMBasically, set up a server it has no Domain only IP, it...

Apache eating Memory

Posted by andrei155, 04-20-2009, 10:31 PMApache is wasting away a bit over a GB of memory at...

external pop email

Posted by dotflyer, 03-28-2008, 03:19 AMOne of my customer using google apps for his domain. He...