Posts Tagged mod_lua

mod lua error handling sux

I still dislike the 500 error handling in lua. Well scripting got easier with practicing :P But the error handling realy sux a lot compared to PHP where I come from. I made a bit “benchmarking”. OK I took very different scripts, but PHP seems faster to me than lua. Plus for lua is that you are able to write direcly into apache log files.

Tags: , , ,

first script for mod_lua apache2.3/2.4

function handle(r)
	r.content_type = "text/html"
	--r.headers_out["X-Powered-By"] = "mod_lua; " .. _VERSION
	r:puts("Hi!")
	return apache2.OK
end

Mod lua expects a function with the name handle() else there is a 500 Error. The error handling is pretty anoying…

Tags: , , , ,

compile lua on windows

Grab the “newest” (2008) http://www.lua.org/ftp/lua-5.1.4.tar.gz
unpack it. Compiling with VC++ is very easy.

Open the x64 %comspec% /E:ON /V:ON /T:0E /K “C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd” /Release
or x86 command line
%comspec% /k “”C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat”” x86

browse to lua folder and run

etc\luavs
copy /y src\*.* .\

Done!

Tags: , , , , ,

Archives by Subject:

Archives by Month: