I'm working on a lighttpd server in an embedded system that is not configured by me. I use Google Chrome to see the source code for the HTML files. I don't know what's wrong but when I request the following simple file:
Note: the file extension is .html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
Hello world!
<?php echo "PHP commands"?>
</body>
</html>
It gives the following file to my browser:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
Hello world!
<!--?php echo "PHP commands"?-->
</body>
</html>
In other words it comments out the php commands disabling them! Why? How can I solve it? Couldn't find anything wrong in the config files.
Even though it is not saved in a file with .php extension, I want lighttpd to ignore the php commands inside the html. I know it's not a valid HTML, but I want it to be untouched.