lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I've installed lua 5.1.4-45, wsapi, wsapi-fcgi, wsapi-xavante on Windows
7 and I'm using apache as web server.
I configured httpd.conf according to:

that means, I installed mod_fcgid and I put the following on httpd.conf:

LoadModule fcgid_module modules/
AddHandler fcgid-script .lua
FcgidWrapper "C:/Lua/5.1/wsapi.fcgi.exe" .lua

then I edited the script, hello.lua:


module(..., package.seeall)

function run(wsapi_env)
  local headers = { ["Content-type"] = "text/html" }

  local function hello_text()
    coroutine.yield("<p>Hello Wsapi!</p>")
    coroutine.yield("<p>PATH_INFO: " .. wsapi_env.PATH_INFO .. "</p>")
    coroutine.yield("<p>SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "</p>")

  return 200, headers, coroutine.wrap(hello_text)

and when I try to point my browser to:
I get:

There was an error in the specified application. The full error message

C:\Lua\5.1\lua/wsapi\common.lua:408: could not find a filename to load,
check your configuration or URL
stack traceback:
    [C]: in function 'error'
    C:\Lua\5.1\lua/wsapi\common.lua:408: in function 'adjust_non_wrapped'
    C:\Lua\5.1\lua/wsapi\common.lua:422: in function 'normalize_paths'
    C:\Lua\5.1\lua/wsapi\common.lua:439: in function 'find_module'
    C:\Lua\5.1\lua/wsapi\common.lua:521: in function
    (tail call): ?
    (tail call): ?
    [C]: in function 'xpcall'
    C:\Lua\5.1\lua/wsapi\common.lua:257: in function 'run_app'
    C:\Lua\5.1\lua/wsapi\common.lua:284: in function 'run'
    C:\Lua\5.1\lua/wsapi\fastcgi.lua:40: in function 'run'
    [string "..."]:27: in main chunk

I thought my installation of mod_fcgi wasn't correct but it works with
It seems that lua doesn't work with mod_fcgi on Windows 7.

Many thanks in advance,