harningt / luajson

JSON parser/encoder for Lua Parses JSON using LPEG for speed and flexibility. Depending on parser/encoder options, various values are preserved as best as possible.
http://www.eharning.us/wiki/luajson/
Other
251 stars 48 forks source link

This is not compatible with Apache httpd mod_lua on Win32 #29

Closed inzi closed 7 years ago

inzi commented 11 years ago

Of note, enters into a loop of some type when invokes by apache 2.4 httpd mod_lua; causing the server to be unresponsive.

The error is somehow related to the buildDecoder function.

Tested on Win7 64bit, running Apache 2.4 32bit with Lua 5.1.

I have been unable to determine where the problem lies specifically. If I load json.decode and comment out line 117 to read:

-- prebuilt_decoders[_M[mode]] = buildDecoder(_M[mode])

It will load.

If I leave the line uncommented, Apache exits with status 255.

harningt commented 10 years ago

Sorry for the delay - I'll try to checkout what special things mod_lua does... my best bet is that _M[mode] is evaluating to nil or perhaps _M itself is nil.

Also important... what version of luajson are you using - I am guessing that you are using 1.2 or before (based on the _M usage), I would recommend testing LuaJSON 1.3.2 or the latest.

harningt commented 9 years ago

Have you tried the latest LuaJSON version?

harningt commented 7 years ago

Over a year old, closing out.