PHP produces extra characters on the web page

I have installed PHP5 and the CGI and have updated the list interpreter and restarted uhttpd.
a phpinfo() works and produces a web page full of info, but when I open this test html:

<!DOCTYPE html>
<html>
<body>
Body text

<p>This is going to be ignored by PHP and displayed by the browser.</p>


<?php echo '<p>While this is going to be parsed.</p>'; ?>


<p>This will also be ignored by PHP and displayed by the browser.</p>
<?php
echo '<p>Hello World</p>';
?>
</body>
</html>

it seems the PHP is not correctly handled. I get these '; ?> which seem to be from the PHP code. Any ideas?

Body text

This is going to be ignored by PHP and displayed by the browser.

While this is going to be parsed.
'; ?>

This will also be ignored by PHP and displayed by the browser.
Hello World
'; ?>

Just figured out - not sure if this is a feature or but:
If the file has an .HTML extension you get the weird output I showed.
If it is a .PHP extension then it works fine.

I guess UHTTPD treats these differently when interpreting the code???

list interpreter ".php=/usr/bin/php-cgi"

http://forum.arduino.cc/index.php?topic=221261.msg1607985#msg1607985

if you want .html also handle by php-cgi

nano /etc/config/uhttpd
...
list interpreter ".php=/usr/bin/php-cgi"
list interpreter ".html=/usr/bin/php-cgi"
...
/etc/init.d/uhttpd restart