Ticket #972 (closed defect: fixed)
lighty.stat() results in error: attempt to call field 'stat' (a nil value)
| Reported by: | finley@… | Owned by: | jan |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Version: | 1.4.13 |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| Need User Feedback: | Blocking: |
Description
distro: ubuntu edgy i386
lighttpd: 1.4.13~r1370-1ubuntu1
lighttpd-mod-magnet: 1.4.13~r1370-1ubuntu1
The following config chunk:
magnet.attract-physical-path-to = ( "/var/www/magnet/HEADER.html.lua3" )
with this as the contents of the /var/www/magnet/HEADER.html.lua3 file:
print("physical.path: " .. lighty.env["physical.path"] .. "/HEADER.html")
if (nil == lighty.stat(lighty.env["physical.path"] .. "/HEADER.html")) then
lighty.content = { "<pre>", { filename = "/var/www/HEADER.html" }, "</pre>" }
lighty.content = ( lighty.env["physical.path"] .. "/HEADER.html" )
lighty.header["Content-Type"] = "text/html"
return 200
end
Produces the following in /var/log/lighttpd/error.log:
2007-01-10 15:40:55: (mod_magnet.c.634) lua_pcall(): /var/www/magnet/HEADER.html.lua3:3: attempt to call field 'stat' (a nil value)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

