D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] dumb question about apace + php

 

On Mon, 06 Aug 2007 23:50:15 +0100, Neil Stone
<neil@xxxxxxxxxxxxxxx> wrote:

>Paul Sutton wrote:
>> Dave Morgan wrote:
>>   
>>> Hi,
>>> all my stand-alone php scripts on my web site work fine, but
>>> attempting to stick a small block of php code inside a html page
>>> does not work at all.
>>>
>>> See http://www.morgad.no-ip.info/ntp/status.html for the page in
>>> question.
>>>
>>> Is there something in my apache or php config I have forgotten to
>>> set?
>>>
>>> Best regards
>>> Dave
>>> (updated sig for Googlemail under construction)
>>>
>>>   
>>>     
>> Not sure if this is the problem, but i had to rename my html filles to 
>> .php in order for any php to work,  even if this was a simple include 
>> statement,
>>
>> paul
>>
>>   
>unless it's called .php the webserver will not be able to tell if the 
>file is flat old html or weather it should be parsed through the php 
>interpreter...
>
>rename the stats.html to stats.php (as per pauls suggestion) and have 
>another shot..

Thanks Paul (and every one else in the thread),
I renamed the file to status.php, and set up re-directs to it for
the ntp/status.html and ntp/index.html pages and all is now good
with the world.

Dave
(who likes simple solutions :-) )

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html