0

I am using Apache httpd 2.4 with Lua 5.1.4. I 'm trying to use the function that comes with r object of each request, as explained here:
https://httpd.apache.org/docs/2.4/mod/mod_lua.html#functions
Some function, like r:write() and r:md5() works well, but most of them doesn't work, this is a minimal list:
- r:setcookie
- r:getcookie
- r:escape

The error is:
AH01471: Lua error: /path/to/lua/file: attempt to call method 'getcookie' (a nil value)

Any help will be appreciated.

1 Answer 1

1

I see at least r:setcookie was added in the maintenance stream, 2.4.7, and had further refinements. You are likely on RedHat's distribution which is 2.4.6 + fixes, or something similar. If updating doesn't work, I would find a different distribution or build httpd from source. Or at least mod_lua!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.