error loading module 'luasql.mysql'
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
I got the same error, my script was working with no problems before an update to trunk. David On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions? On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do? On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil < david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello, That works fine: box:~# lua testdb.lua box:~# David On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Man, I'm in the process of switching from Python to Lua because of bugs in the Python support. If Lua doesn't work with odbc, that's a big problem. Does anybody have any other advice? On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil < david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it
did
not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com>
wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
It does support SQL. Not sure about ODBC specifically. I know it does support PostgreSQL, MySQL and Oracle (http://www.keplerproject.org/luasql/) And for it was working, it is actually still working on 1 box. David On Thu, Jan 28, 2010 at 3:41 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
Man, I'm in the process of switching from Python to Lua because of bugs in the Python support. If Lua doesn't work with odbc, that's a big problem. Does anybody have any other advice?
On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
And you can make queries against your MySQL database, and get results, etc.? On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil < david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it
did
not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com>
wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Oh yes, here's an example: function dbConnect() -- connect to db require "luasql.mysql" env = assert(luasql.mysql()) conn = assert(env:connect("freeswitch","user","userpass","localhost")) end function getpin() session:streamFile(card_greeting_audio_file) card_pin = session:getDigits(4, "#", 3000); if card_pin > "" then freeswitch.consoleLog("info", "CARD INFO: PIN...........: ".. card_pin .."\n"); cur = assert( conn:execute( "select * from cards_table where pin =".. card_pin ..";" ) ) -- print all rows, the rows will be indexed by field names row = cur:fetch ({}, "a") fsLog("ROWS: ".. cur:numrows() ) if cur:numrows() > 0 then pinok=true end while row do fsLog("CARD INFO: Batch.........: ".. row.batch ) fsLog("CARD INFO: Card Name.....: ".. row.card_name ) fsLog("CARD INFO: Ratetable.....: ".. row.ratetable ) fsLog("CARD INFO: Initial Bal...: ".. row.init_bal ) fsLog("CARD INFO: Curr Balance..: ".. row.balance ) batch, ratetable, init_bal, balance = row.batch, row.ratetable, row.init_bal, row.balance SetVar("card_pin",card_pin) SetVar("card_batch", batch) SetVar("card_ratetable", ratetable) SetVar("card_init_bal", init_bal) SetVar("card_balance", balance) -- reusing the table of results row = cur:fetch (row, "a") end else pinok=false session:streamFile(card_invalid_pin_audio_file) end end On Thu, Jan 28, 2010 at 9:05 PM, Mike van Lammeren <mike@van.lammeren.net> wrote:
And you can make queries against your MySQL database, and get results, etc.?
On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
David, Are you using Lua and lusql for some exotic call handling scenarios? If so, would you mind posting some examples to the wiki and then linking here? Also, if you can join the community conference call today that would be great! Thanks, MC On Fri, Jan 29, 2010 at 7:22 AM, David Villasmil < david.villasmil.work@gmail.com> wrote:
Oh yes, here's an example:
function dbConnect() -- connect to db require "luasql.mysql" env = assert(luasql.mysql()) conn = assert(env:connect("freeswitch","user","userpass","localhost")) end
function getpin() session:streamFile(card_greeting_audio_file)
card_pin = session:getDigits(4, "#", 3000);
if card_pin > "" then freeswitch.consoleLog("info", "CARD INFO: PIN...........: ".. card_pin .."\n"); cur = assert( conn:execute( "select * from cards_table where pin =".. card_pin ..";" ) )
-- print all rows, the rows will be indexed by field names row = cur:fetch ({}, "a") fsLog("ROWS: ".. cur:numrows() ) if cur:numrows() > 0 then pinok=true end while row do
fsLog("CARD INFO: Batch.........: ".. row.batch ) fsLog("CARD INFO: Card Name.....: ".. row.card_name ) fsLog("CARD INFO: Ratetable.....: ".. row.ratetable ) fsLog("CARD INFO: Initial Bal...: ".. row.init_bal ) fsLog("CARD INFO: Curr Balance..: ".. row.balance )
batch, ratetable, init_bal, balance = row.batch, row.ratetable, row.init_bal, row.balance
SetVar("card_pin",card_pin) SetVar("card_batch", batch) SetVar("card_ratetable", ratetable) SetVar("card_init_bal", init_bal) SetVar("card_balance", balance)
-- reusing the table of results row = cur:fetch (row, "a") end else pinok=false session:streamFile(card_invalid_pin_audio_file) end end
On Thu, Jan 28, 2010 at 9:05 PM, Mike van Lammeren <mike@van.lammeren.net> wrote:
And you can make queries against your MySQL database, and get results, etc.?
On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote:
I got the same error, my script was working with no problems before
an
update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote: > Hi, I followed the instructions in the Lua documentation for setting > up > luasql, but when I try to run my script I get: > 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading > module > 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': > /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore > segment > prot > after reloc: Permission denied > stack traceback: > [C]: ? > [C]: in function 'require' > /usr/local/freeswitch/scripts/l.lua:2: in main chunk > I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. > I changed the permissions for mysql.so and for my script to 777, so > I'm > not > sure where the permission problem could be. > I'd appreciate any suggestions. > Thanks, > Adam > > _______________________________________________ > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > > > UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org > >
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Today what time/timezone? On Fri, Jan 29, 2010 at 4:30 PM, Michael Collins <msc@freeswitch.org> wrote:
David,
Are you using Lua and lusql for some exotic call handling scenarios? If so, would you mind posting some examples to the wiki and then linking here? Also, if you can join the community conference call today that would be great!
Thanks, MC
On Fri, Jan 29, 2010 at 7:22 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Oh yes, here's an example:
function dbConnect() -- connect to db require "luasql.mysql" env = assert(luasql.mysql()) conn = assert(env:connect("freeswitch","user","userpass","localhost")) end
function getpin() session:streamFile(card_greeting_audio_file)
card_pin = session:getDigits(4, "#", 3000);
if card_pin > "" then freeswitch.consoleLog("info", "CARD INFO: PIN...........: ".. card_pin .."\n"); cur = assert( conn:execute( "select * from cards_table where pin =".. card_pin ..";" ) )
-- print all rows, the rows will be indexed by field names row = cur:fetch ({}, "a") fsLog("ROWS: ".. cur:numrows() ) if cur:numrows() > 0 then pinok=true end while row do
fsLog("CARD INFO: Batch.........: ".. row.batch ) fsLog("CARD INFO: Card Name.....: ".. row.card_name ) fsLog("CARD INFO: Ratetable.....: ".. row.ratetable ) fsLog("CARD INFO: Initial Bal...: ".. row.init_bal ) fsLog("CARD INFO: Curr Balance..: ".. row.balance )
batch, ratetable, init_bal, balance = row.batch, row.ratetable, row.init_bal, row.balance
SetVar("card_pin",card_pin) SetVar("card_batch", batch) SetVar("card_ratetable", ratetable) SetVar("card_init_bal", init_bal) SetVar("card_balance", balance)
-- reusing the table of results row = cur:fetch (row, "a") end else pinok=false session:streamFile(card_invalid_pin_audio_file) end end
On Thu, Jan 28, 2010 at 9:05 PM, Mike van Lammeren <mike@van.lammeren.net> wrote:
And you can make queries against your MySQL database, and get results, etc.?
On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote: > > I got the same error, my script was working with no problems before > an > update to trunk. > > David > > On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> > wrote: > > Hi, I followed the instructions in the Lua documentation for > > setting > > up > > luasql, but when I try to run my script I get: > > 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading > > module > > 'luasql.mysql' from file > > '/usr/local/lib/lua/5.1/luasql/mysql.so': > > /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore > > segment > > prot > > after reloc: Permission denied > > stack traceback: > > [C]: ? > > [C]: in function 'require' > > /usr/local/freeswitch/scripts/l.lua:2: in main chunk > > I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. > > I changed the permissions for mysql.so and for my script to 777, > > so > > I'm > > not > > sure where the permission problem could be. > > I'd appreciate any suggestions. > > Thanks, > > Adam > > > > _______________________________________________ > > FreeSWITCH-users mailing list > > FreeSWITCH-users@lists.freeswitch.org > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > > > > > > > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > > http://www.freeswitch.org > > > > > > _______________________________________________ > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
http://wiki.freeswitch.org/wiki/FS_weekly_2010_01_29 Calling Instructions Friday January 29 at 1700 UTC (1100 CST) sip:888@conference.freeswitch.org or via the good old PSTN at +1-919-386-9900 Or click on this link Or call Skype the skype user "skypiax5", then press "1" on the Skype dialpad (max 20 concurrent users). Codecs: PCMU/PCMA, G.722, CELT, Speex, Skype, among others On Jan 29, 2010, at 9:51 AM, David Villasmil wrote:
Today what time/timezone?
On Fri, Jan 29, 2010 at 4:30 PM, Michael Collins <msc@freeswitch.org> wrote:
David,
Are you using Lua and lusql for some exotic call handling scenarios? If so, would you mind posting some examples to the wiki and then linking here? Also, if you can join the community conference call today that would be great!
Thanks, MC
On Fri, Jan 29, 2010 at 7:22 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Oh yes, here's an example:
function dbConnect() -- connect to db require "luasql.mysql" env = assert(luasql.mysql()) conn = assert(env:connect("freeswitch","user","userpass","localhost")) end
function getpin() session:streamFile(card_greeting_audio_file)
card_pin = session:getDigits(4, "#", 3000);
if card_pin > "" then freeswitch.consoleLog("info", "CARD INFO: PIN...........: ".. card_pin .."\n"); cur = assert( conn:execute( "select * from cards_table where pin =".. card_pin ..";" ) )
-- print all rows, the rows will be indexed by field names row = cur:fetch ({}, "a") fsLog("ROWS: ".. cur:numrows() ) if cur:numrows() > 0 then pinok=true end while row do
fsLog("CARD INFO: Batch.........: ".. row.batch ) fsLog("CARD INFO: Card Name.....: ".. row.card_name ) fsLog("CARD INFO: Ratetable.....: ".. row.ratetable ) fsLog("CARD INFO: Initial Bal...: ".. row.init_bal ) fsLog("CARD INFO: Curr Balance..: ".. row.balance )
batch, ratetable, init_bal, balance = row.batch, row.ratetable, row.init_bal, row.balance
SetVar("card_pin",card_pin) SetVar("card_batch", batch) SetVar("card_ratetable", ratetable) SetVar("card_init_bal", init_bal) SetVar("card_balance", balance)
-- reusing the table of results row = cur:fetch (row, "a") end else pinok=false session:streamFile(card_invalid_pin_audio_file) end end
On Thu, Jan 28, 2010 at 9:05 PM, Mike van Lammeren <mike@van.lammeren.net> wrote:
And you can make queries against your MySQL database, and get results, etc.?
On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com > wrote: > > I tried running ldconfig on the directory containing mysql.so, > but > it > did > not help. > So it sounds like there could be a bug in the latter versions? > > On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil > <david.villasmil.work@gmail.com> wrote: >> >> I got the same error, my script was working with no problems >> before >> an >> update to trunk. >> >> David >> >> On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com >> > >> wrote: >>> Hi, I followed the instructions in the Lua documentation for >>> setting >>> up >>> luasql, but when I try to run my script I get: >>> 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading >>> module >>> 'luasql.mysql' from file >>> '/usr/local/lib/lua/5.1/luasql/mysql.so': >>> /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore >>> segment >>> prot >>> after reloc: Permission denied >>> stack traceback: >>> [C]: ? >>> [C]: in function 'require' >>> /usr/local/freeswitch/scripts/l.lua:2: in main chunk >>> I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. >>> I changed the permissions for mysql.so and for my script to >>> 777, >>> so >>> I'm >>> not >>> sure where the permission problem could be. >>> I'd appreciate any suggestions. >>> Thanks, >>> Adam >>> >>> _______________________________________________ >>> FreeSWITCH-users mailing list >>> FreeSWITCH-users@lists.freeswitch.org >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>> >>> >>> >>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users >>> http://www.freeswitch.org >>> >>> >> >> _______________________________________________ >> FreeSWITCH-users mailing list >> FreeSWITCH-users@lists.freeswitch.org >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users >> >> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users >> http://www.freeswitch.org > > > _______________________________________________ > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org >
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Friday January 29 at 1700 UTC (1100 CST) sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> or via the good old PSTN at +1-919-386-9900 Or click on this link<http://www.phonefromhere.com/freeswitch/freeswitch.xsql> Or call Skype the skype user "skypiax5", then press "1" on the Skype dialpad (max 20 concurrent users). Codecs: PCMU/PCMA, G.722, CELT, Speex, Skype, among others More info here http://wiki.freeswitch.org/wiki/FS_weekly_2010_01_29
Where in the wiki? On Fri, Jan 29, 2010 at 4:30 PM, Michael Collins <msc@freeswitch.org> wrote:
David,
Are you using Lua and lusql for some exotic call handling scenarios? If so, would you mind posting some examples to the wiki and then linking here? Also, if you can join the community conference call today that would be great!
Thanks, MC
On Fri, Jan 29, 2010 at 7:22 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Oh yes, here's an example:
function dbConnect() -- connect to db require "luasql.mysql" env = assert(luasql.mysql()) conn = assert(env:connect("freeswitch","user","userpass","localhost")) end
function getpin() session:streamFile(card_greeting_audio_file)
card_pin = session:getDigits(4, "#", 3000);
if card_pin > "" then freeswitch.consoleLog("info", "CARD INFO: PIN...........: ".. card_pin .."\n"); cur = assert( conn:execute( "select * from cards_table where pin =".. card_pin ..";" ) )
-- print all rows, the rows will be indexed by field names row = cur:fetch ({}, "a") fsLog("ROWS: ".. cur:numrows() ) if cur:numrows() > 0 then pinok=true end while row do
fsLog("CARD INFO: Batch.........: ".. row.batch ) fsLog("CARD INFO: Card Name.....: ".. row.card_name ) fsLog("CARD INFO: Ratetable.....: ".. row.ratetable ) fsLog("CARD INFO: Initial Bal...: ".. row.init_bal ) fsLog("CARD INFO: Curr Balance..: ".. row.balance )
batch, ratetable, init_bal, balance = row.batch, row.ratetable, row.init_bal, row.balance
SetVar("card_pin",card_pin) SetVar("card_batch", batch) SetVar("card_ratetable", ratetable) SetVar("card_init_bal", init_bal) SetVar("card_balance", balance)
-- reusing the table of results row = cur:fetch (row, "a") end else pinok=false session:streamFile(card_invalid_pin_audio_file) end end
On Thu, Jan 28, 2010 at 9:05 PM, Mike van Lammeren <mike@van.lammeren.net> wrote:
And you can make queries against your MySQL database, and get results, etc.?
On Thu, Jan 28, 2010 at 2:43 AM, David Villasmil <david.villasmil.work@gmail.com> wrote:
Hello,
That works fine:
box:~# lua testdb.lua box:~#
David
On Thu, Jan 28, 2010 at 7:27 AM, Mike van Lammeren <mike@van.lammeren.net> wrote:
Have you tried running a Lua script that includes the library from outside of FreeSWITCH? What does that do?
On Wed, Jan 27, 2010 at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com> wrote: > > I got the same error, my script was working with no problems before > an > update to trunk. > > David > > On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> > wrote: > > Hi, I followed the instructions in the Lua documentation for > > setting > > up > > luasql, but when I try to run my script I get: > > 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading > > module > > 'luasql.mysql' from file > > '/usr/local/lib/lua/5.1/luasql/mysql.so': > > /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore > > segment > > prot > > after reloc: Permission denied > > stack traceback: > > [C]: ? > > [C]: in function 'require' > > /usr/local/freeswitch/scripts/l.lua:2: in main chunk > > I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. > > I changed the permissions for mysql.so and for my script to 777, > > so > > I'm > > not > > sure where the permission problem could be. > > I'd appreciate any suggestions. > > Thanks, > > Adam > > > > _______________________________________________ > > FreeSWITCH-users mailing list > > FreeSWITCH-users@lists.freeswitch.org > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > > > > > > > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > > http://www.freeswitch.org > > > > > > _______________________________________________ > FreeSWITCH-users mailing list > FreeSWITCH-users@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users > > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users > http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
http://www.google.com/search?q=cannot+restore+segment+prot+after+reloc:+Perm... Google says this is selinux configured to enforcing without setting it up properly to allow what your trying to do. Try disabling selinux, and if that works and you want selinux enabled, you will need to come up with the propper config. Mike On Jan 27, 2010, at 11:47 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
I tried running ldconfig on the directory containing mysql.so, but it did not help. So it sounds like there could be a bug in the latter versions?
On Wed, Jan 27, 2010 at 8:09 PM, David Villasmil <david.villasmil.work@gmail.com
wrote: I got the same error, my script was working with no problems before an update to trunk.
David
On Thu, Jan 28, 2010 at 1:15 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get: 2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk I'm running FreeSWITCH version 1.4 and luasql version 2.1.1. I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be. I'd appreciate any suggestions. Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- users http://www.freeswitch.org
On 01/31/2010 06:58 AM, Michael Jerris wrote:
http://www.google.com/search?q=cannot+restore+segment+prot+after+reloc:+Perm...
Google says this is selinux configured to enforcing without setting it up properly to allow what your trying to do. Try disabling selinux, and if that works and you want selinux enabled, you will need to come up with the propper config.
To fix a similar error message this is what I had in an old spec file: /sbin/restorecon -v /usr/lib64/somelib.so Iirc this is not the proper way to fix this and one should use the chcon command (chcon -t ...) or create an selinux policy. man chcon and google has more info. Regards, Patrick
Be careful with lua and sql I have heard countless reports of the luasql leaking memory like a fire hydrant..... We may need to make our own odbc obj so every embedded lang can share it. But it takes time and resources. On Jan 31, 2010 7:11 AM, "Patrick" <freeswitch-list@puzzled.xs4all.nl> wrote: On 01/31/2010 06:58 AM, Michael Jerris wrote:
http://www.google.com/search?q=cannot+restore+segmen... To fix a similar error message this is what I had in an old spec file: /sbin/restorecon -v /usr/lib64/somelib.so
Iirc this is not the proper way to fix this and one should use the chcon command (chcon -t ...) or create an selinux policy. man chcon and google has more info. Regards, Patrick _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@l...
There is memory leak with luasql mysql module, but everything is fine with luasql odbc module. Is someone working on lua interface to freeswitch core odbc functions? On Sunday 31 January 2010, Anthony Minessale wrote:
Be careful with lua and sql I have heard countless reports of the luasql leaking memory like a fire hydrant.....
We may need to make our own odbc obj so every embedded lang can share it. But it takes time and resources.
On Jan 31, 2010 7:11 AM, "Patrick" <freeswitch-list@puzzled.xs4all.nl> wrote:
On 01/31/2010 06:58 AM, Michael Jerris wrote:
To fix a similar error message this is what I had in an old spec file: /sbin/restorecon -v /usr/lib64/somelib.so
Iirc this is not the proper way to fix this and one should use the chcon command (chcon -t ...) or create an selinux policy. man chcon and google has more info.
Regards, Patrick
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@l...
Hello Anthony, Is this in planning? David On Sun, Jan 31, 2010 at 3:21 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
Be careful with lua and sql I have heard countless reports of the luasql leaking memory like a fire hydrant.....
We may need to make our own odbc obj so every embedded lang can share it. But it takes time and resources.
On Jan 31, 2010 7:11 AM, "Patrick" <freeswitch-list@puzzled.xs4all.nl> wrote:
To fix a similar error message this is what I had in an old spec file: /sbin/restorecon -v /usr/lib64/somelib.so
Iirc this is not the proper way to fix this and one should use the chcon command (chcon -t ...) or create an selinux policy. man chcon and google has more info.
Regards, Patrick
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@l...
On 01/31/2010 06:58 AM, Michael Jerris wrote:
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
For me, the mysql.so library didn't work until I ran ldconfig on the directory that contained it. Mike van Lammeren On Wed, Jan 27, 2010 at 7:15 PM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get:
2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk
I'm running FreeSWITCH version 1.4 and luasql version 2.1.1.
I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be.
I'd appreciate any suggestions.
Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I hope, you have solved this issue. I also faced the same issue and solved by disabling "*selinux*" utility. execute following command and follow the instruction to disable it. *system-config-securitylevel-tui* I hope, It will be useful for newbies :) Regards, Venkat. On Thu, Jan 28, 2010 at 5:45 AM, Adam Wilt <wiltingtree@gmail.com> wrote:
Hi, I followed the instructions in the Lua documentation for setting up luasql, but when I try to run my script I get:
2010-01-27 19:08:14.799250 [ERR] mod_lua.cpp:182 error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: cannot restore segment prot after reloc: Permission denied stack traceback: [C]: ? [C]: in function 'require' /usr/local/freeswitch/scripts/l.lua:2: in main chunk
I'm running FreeSWITCH version 1.4 and luasql version 2.1.1.
I changed the permissions for mysql.so and for my script to 777, so I'm not sure where the permission problem could be.
I'd appreciate any suggestions.
Thanks, Adam
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- If you have come to help me, you are wasting your time. If you have come to because your liberation is bound up in mine, we can work together. Regards Venkatesan OV.
participants (11)
-
Adam Wilt
-
Anthony Minessale
-
David Villasmil
-
Michael Collins
-
Michael Jerris
-
Mike van Lammeren
-
ovvenkat
-
Patrick
-
Rob Forman
-
Sergey Okhapkin
-
William Suffill