<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello!<br>
<br>
Would You please explain why?? I have no db_connect.lua in my
scripts directory and also no freeswitch installed in
/usr/local/freeswitch. <br>
<br>
<blockquote
cite="mid:BANLkTikuW+aZ_P0MpKHv2Ngey-2x=769wQ@mail.gmail.com"
type="cite">Before run Freeswitch you have to put this command:<br>
<br>
export LUA_PATH=/usr/local/freeswitch/scripts/db_connect.lua<br>
<br>
<br>
<div class="gmail_quote">On Tue, Apr 19, 2011 at 10:34 AM, Boris
Kovalenko <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:boris@tagnet.ru">boris@tagnet.ru</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">Hello!<br>
<br>
I want to include LUA script into another LUA script. I
have<br>
modified lua.conf.xml and set <param
name="script-directory"<br>
value="$${base_dir}/scripts/?"/> and restarted freeswitch.
In my script<br>
called test1.lua I wrote: require('test2.lua');<br>
test2.lua is placed into the same directory as test1.lua, and
directory<br>
is /opt/fs/scripts/. But luarun test1.lua gives an error:<br>
2011-04-19 10:14:40.651205 [ERR] mod_lua.cpp:182<br>
/opt/fs/scripts/test1.lua:3: module 'test2.lua' not found:<br>
no field package.preload['test2.lua']<br>
no file '/opt/fs/scripts/test2/lua'<br>
no file './test2/lua.so'<br>
no file './libtest2/lua51.so'<br>
no file '/usr/local/lib/lua/5.1/test2/lua.so'<br>
no file '/usr/local/lib/lua/5.1/libtest2/lua51.so'<br>
no file '/usr/local/lib/lua/5.1/loadall.so'<br>
no file './test2.so'<br>
no file './libtest251.so'<br>
no file '/usr/local/lib/lua/5.1/test2.so'<br>
no file '/usr/local/lib/lua/5.1/libtest251.so'<br>
no file '/usr/local/lib/lua/5.1/loadall.so'<br>
stack traceback:<br>
[C]: in function 'require'<br>
/opt/fs/scripts/test1.lua:3: in main chunk<br>
<br>
<br>
What is wrong with my setup?<br>
<br>
--<br>
Regards,<br>
Boris<br>
<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Regards <br>
---------- <br>
M Emran<br>
<br>
E-Mail: <a moz-do-not-send="true"
href="mailto:info@e-softbilling.com" target="_blank">info@e-softbilling.com</a><br>
Web: <a moz-do-not-send="true"
href="http://www.e-softbilling.com/" target="_blank">www.e-softbilling.com</a><br>
<a moz-do-not-send="true"
href="http://www.isoftswitch.com/" target="_blank">www.isoftswitch.com</a><br>
<a moz-do-not-send="true"
href="http://www.howtonix.com/" target="_blank">www.howtonix.com</a><br>
<a moz-do-not-send="true"
href="http://www.sipmobiledialer.com/" target="_blank">www.sipmobiledialer.com</a><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Regards,
Boris
</pre>
</body>
</html>