0

I'm running LUCI with lighttpd on ubuntu 16.04. i'm using lua5.1 and luci-0.9

the directory structure in www/html/ is:

root@toor-VirtualBox:/var/www/html# ls
cgi-bin  cgi-bin-nodes.html  cgi-bin-status.html  index.html  index.lighttpd.html  luci  luci-static

when i run

Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require "luci.cacheloader"
> require "luci.sgi.cgi"
> 
> luci.dispatcher.indexcache = "/tmp/luci-indexcache"
> 
> luci.sgi.cgi.run()

I get 500 internal server error:

.../luci/host//usr/lib/lua/luci/statistics/datatree.lua:28: attempt to index upvalue 'sections' (a nil value)
stack traceback:
    .../luci/host//usr/lib/lua/luci/statistics/datatree.lua:28: in function '__init__'
    /home/luci/host//usr/lib/lua/luci/util.lua:70: in function 'Instance'
    .../luci/controller/luci_statistics/luci_statistics.lua:30: in function 'v'
    /home/luci/host//usr/lib/lua/luci/dispatcher.lua:496: in function 'createtree'
    /home/luci/host//usr/lib/lua/luci/dispatcher.lua:179: in function 'dispatch'
    /home/luci/host//usr/lib/lua/luci/dispatcher.lua:143: in function </home/luci/host//usr/lib/lua/luci/dispatcher.lua:142>
Status: 500 Internal Server Error
Content-Type: text/plain
Cache-Control: no-cache
Expires: 0

any solution?

melpomene
  • 84,125
  • 8
  • 85
  • 148
umer
  • 3
  • 3
  • My guess is: the `run` method may need to be called with `:` instead of `.` and the library fails to check for that and give you a proper error. – DarkWiiPlayer Jul 30 '19 at 06:33
  • solved by following [this post](http://blog.sina.com.cn/s/blog_a1e6528101013k0k.html). but now I'm getting this error with 500 internal server error: 7月 30 14:59:07 toor-VirtualBox lighttpd[20600]: no file '/usr/local/lib/lua/5.1/loadall.so' 7月 30 14:59:07 toor-VirtualBox lighttpd[20600]: no file './luci.so' 7月 30 14:59:07 toor-VirtualBox lighttpd[20600]: no file '/usr/local/lib/lua/5.1/luci.so' – umer Jul 30 '19 at 07:26
  • This might be related: https://github.com/openwrt/luci/issues/1105 – wp78de Jul 30 '19 at 20:46
  • it doesn't solve the issue :( – umer Aug 01 '19 at 00:39

0 Answers0