I found my answer: needed to link up another location in the lua config:
<param name="script-directory" value="/usr/share/lua/5.1/?.lua"/>


On Mon, Nov 25, 2013 at 6:04 PM, Neil Patel <neilp@cs.stanford.edu> wrote:
Hi All,

I have FS 1.2 stable installed on fresh Ubuntu 12.04 LTS. I installed lua and lua socket libraries from package:

# apt-get install lua5.1 liblua5.1-socket-dev liblua5.1-socket2

This installed socket module in /usr/lib/i386-linux-gnu/lua/5.1/, which I added as a module directory in lua.conf.xml.

When I attempt to run the command "require 'socket.http'" in a lua script within FS, I get this error:

2013-11-25 10:14:38.394321 [ERR] mod_lua.cpp:199 /usr/local/freeswitch/scripts/test.lua:27: module 'socket.http' not found:
no field package.preload['socket.http']
no file './socket/http.lua'
no file '/usr/local/share/lua/5.1/socket/http.lua'
no file '/usr/local/share/lua/5.1/socket/http/init.lua'
no file '/usr/local/lib/lua/5.1/socket/http.lua'
no file '/usr/local/lib/lua/5.1/socket/http/init.lua'
no file '/usr/lib/i386-linux-gnu/lua/5.1/socket/http.so'
no file '/usr/lib/i386-linux-gnu/lua/5.1/socket.so'
stack traceback:
[C]: in function 'require'

It's looking for http.so; however in the socket module library there are only the files core.so and unix.so

When I run lua interpreter from terminal and try the same require command, it works without complaint:

root@server:~# lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require "socket.http";
>

So why is FS' lua complaining about a luasocket library that standard lua isn't, and how do I deal with it?

Thanks,
Neil