Re: Moto drops Mysql connection
David Hakim <dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]> Wed, 26 Feb 2003 10:34:48 -0500
| Newsgroups | gmane.comp.lang.moto.user,gmane.comp.lang.moto.devel |
|---|---|
| Message-ID | <[email protected]> |
Cory: I think the problem with your installation is that the MySQL
extension needs to be linked to the libz library (by adding Library:
-lz to the MySQL.i file). Certain installations of MySQL have drivers
that depend on that library. We will need to look into the configure
scripts for the MySQL driver to find out why this dependency wasn't
identified at build time.
Shay: Could you look into the -lz dependency ?
Jack: I wonder if your issue with the mysql driver may be due to an
adverse interaction with other apache modules. Are you running PHP or
other modules that do mysql interaction on the same apache server ? If
you are, would you mind re-trying your moto scripts with those modules
unloaded and letting us know if that works ?
Cory: Didn't you tell me once that the default PHP MySQL driver was
limited to a single database connection ? I'm wondering if what's going
on here is that the database is accessed on one page, it works fine,
and then something tries to access it again before the connection is
closed. If PHP is loaded Moto could be using symbols from the PHP MySQL
driver ... and that's never good :)
-Dave
On Wednesday, February 26, 2003, at 01:11 AM, Cory Wright wrote:
>> There have been problems with Moto on Debian in the past. My laptop
>> runs
>> Debian so I will try out your code tonight and see if I get the same
>> results.
>
> Well, the story gets more interesting. In the process of trying to
> reproduce
> Jack's problems I keep getting the following error:
>
> corz@dandolo:/var/www$ moto jack.moto
> Feb 26 01:04:19 ERROR dl.c
> /usr/local/moto/mx/codex/db/mysql/libmx_codex_db_mysql.so: undefined
> symbol: uncompress
> Feb 26 01:04:19 ERROR dl.c moto: undefined symbol:
> __MOTO_codex_db_mysql_get_record
> Segmentation fault
>
> The jack.moto file contains the following:
>
> $use("codex.db.mysql")
> $use("codex.util")
> $use("codex.http")
>
> <html>
>
> <body BGCOLOR = #FFFFFF TEXT = #000000 marginheight="0" marginwidth="0"
> topmargin="0" leftmargin="0" onLoad="Startup()">
>
> ${
> MySQLConnection conn = new
> MySQLConnection("localhost","db","user","pass");
> String tableName = "transactions";
> String query = "select * from " + tableName;
> MySQLResultSet rset = conn.query(query);
> }$
>
> $declare(int cols=rset.getColumns())
> $declare(int i)
> $for(i=0;i<cols;i++)
> $(rset.getColumnName(i))
> $endfor
>
>
> This is on a Debian Woody box. Other moto files are working fine, but
> connecting to the database is giving me issues. Maybe the two problems
> are related? Any thoughts?
>
> (Sorry Jack, I was trying to solve your problem!)
>
> Cory
>
> --
> Cory Wright
> Stand Blue Technology
> http://www.standblue.net/
>