RE: [moto-users] Moto drops Mysql connection

"Shay Harding" <sharding-YCNXYxaMkU/[email protected]> Wed, 26 Feb 2003 09:02:33 -0700
Newsgroups gmane.comp.lang.moto.devel,gmane.comp.lang.moto.user
Organization CCBill
Message-ID <001d01c2ddb0$791de4a0$7500000a@ccbill22ms668m>
The MySQL.i file has the dependency of zlib and shouldn't even build if zlib
can't be found. Is zlib loaded so its symbols are accessible? What version
of zlib is installed?

Not sure why it can't find "__MOTO_codex_db_mysql_get_record". This is
compiled via the exports.mx.c file which I think moto creates when building
an extension.

Think I might have to download and burn me a copy of Debian to look into
this some more. Nice thing about running VMWare is that I can have many
installs of linux on my one Windows 2000 box :)

Are you using the same devel version of Debian Cory?



One thing I think should be considered is using the mysql_config that comes
with MySQL to determine paths, libraries, etc. The AC_MYSQL would need to be
changed to see if the file exists and if not do what it does now (not sure
if older MySQLs have the mysql_config or if certain linux builds don't get
it either). This seems more portable than the current implementation. The
same thing can probably be done with PGSQL as well. This would also allow us
to determine if openssl is needed for the postgres configure.



Shay



> -----Original Message-----
> From: David Hakim [mailto:dhakim-Gkm/TONP9n1Wk0Htik3J/[email protected]] 
> Sent: Wednesday, February 26, 2003 8:35 AM
> To: Cory Wright
> Cc: Moto Users; [email protected]
> Subject: Re: [moto-users] Moto drops Mysql connection
> 
> 
> 	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

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003