why return HTTP 500 when use the require "resty.memcached" in HttpLuaModule module?

Xiangong Yang monitor.xoyo at gmail.com
Sat Jun 16 06:44:38 UTC 2012


i use agentzh's three modules.
http://wiki.nginx.org/HttpLuaModule
https://github.com/agentzh/xss-nginx-module
https://github.com/agentzh/lua-resty-memcached


CentOS 5.5 x86_64

nginx version is 1.3.1

LUA version:
[root at db2 conf]# *lua -v
*Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
[root at db2 conf]# *luac -v
*Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio


*the lua-resty-memcached is installed.*

[root at db2 conf]# *ll /usr/local/lib/lua/resty/
*total 12
-rwxr-xr-x 1 root root 11778 Jun 16 16:27 memcached.lua


*nginx configuration*

# set search paths for pure Lua external libraries (';;' is the default
path):
lua_package_path
"/usr/lib/?.lua;/usr/local/lib/?.lua;/usr/local/lib/lua/5.1/?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/?.lua
;/usr/local/lib/lua/resty/?.lua;;";
# set search paths for Lua external libraries written in C (can also use
'/bar/baz/?.so;/blah/blah/?.so;;'):
lua_package_cpath '/usr/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/?/?.so;;';

server {
..................
    location ~ "^/property/([0-9]+)" {
        charset utf-8;
        default_type 'text/plain';
        xss_callback_arg callback;
        xss_get on;
        #content_by_lua "ngx.say('Hello,world!')";
        content_by_lua '
            local memcached = require "resty.memcached"
        ';
    }
..................
}



the *require "resty.memcached"* code leads the nginx retrun *HTTP 500 (500
Internal Server Error)*


 why the nginx return HTTP 500 when i use the *require "resty.memcached"* ?

Are there some lua dependencies that i've not installed?

best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120616/6a2256c5/attachment.html>


More information about the nginx mailing list