Bug #316
lighttpd wants me to download index.cml
| Status: | Wontfix | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | mod_cml | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | wontfix |
|
| Patch available: |
Description
I'm running sarge and having difficulties enabling CML.
I installed lighttpd_1.4.3-1_i386.deb and enabled mod_cml and created a webpage for testing CML but when accessing http://localhost/index.cml the page is provided as a download instead of a webpage.
The file output.html is only created when calling trigger.php directly, not trough index.cml.
My current setup:
- content of lighttpd.conf which isn't standard:
server.modules = ( "mod_cml", "mod_access", "mod_fastcgi", "mod_accesslog" )
server.indexfiles = ( "index.cml", "index.php", "index.html" ) - contents of index.cml:
output_contenttype = "text/html"
trigger_handler = "trigger.php"
-- this file updated by the trigger
output_include = { "output.html" }
docroot = requestDOCUMENT_ROOT
cwd = requestCWD
-- the dependencies
files = { cwd .. "input.html" }
cached_mtime = file_mtime(cwd .. "output.html")
-- if one of the source files is newer than the generated files
-- call the trigger
for i,v in ipairs(files) do
if file_mtime(v) > cached_mtime then return 1 end
end
return 0
- contents of trigger.php:
$content = file_get_contents('input.html');
file_put_contents('output.html', $content);
?>
-- mailmesuf