Bug #316

lighttpd wants me to download index.cml

Added by Anonymous 1189 days ago. Updated 88 days ago.

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:

  1. 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" )
  2. 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

  1. contents of trigger.php:

$content = file_get_contents('input.html');
file_put_contents('output.html', $content);

?>

-- mailmesuf

History

09/01/2008 03:11 PM - stbuehler

  • Status changed from New to Fixed
  • Resolution set to wontfix

mod_cml is deprecated.

10/10/2008 07:03 PM - stbuehler

  • Status changed from Fixed to Wontfix

Also available in: Atom PDF