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]]=20 > Sent: Wednesday, February 26, 2003 8:35 AM > To: Cory Wright > Cc: Moto Users; [email protected] > Subject: Re: [moto-users] Moto drops Mysql connection >=20 >=20 > Cory: I think the problem with your installation is=20 > that the MySQL=20 > extension needs to be linked to the libz library (by adding Library:=20 > -lz to the MySQL.i file). Certain installations of MySQL have drivers=20 > that depend on that library. We will need to look into the configure=20 > scripts for the MySQL driver to find out why this dependency wasn't=20 > identified at build time. >=20 > Shay: Could you look into the -lz dependency ? >=20 > Jack: I wonder if your issue with the mysql driver may=20 > be due to an=20 > adverse interaction with other apache modules. Are you running PHP or=20 > other modules that do mysql interaction on the same apache=20 > server ? If=20 > you are, would you mind re-trying your moto scripts with=20 > those modules=20 > unloaded and letting us know if that works ? >=20 > Cory: Didn't you tell me once that the default PHP=20 > MySQL driver was=20 > limited to a single database connection ? I'm wondering if=20 > what's going=20 > on here is that the database is accessed on one page, it works fine,=20 > and then something tries to access it again before the connection is=20 > closed. If PHP is loaded Moto could be using symbols from the=20 > PHP MySQL=20 > driver ... and that's never good :) >=20 > -Dave >=20 > On Wednesday, February 26, 2003, at 01:11 AM, Cory Wright wrote: >=20 > >> There have been problems with Moto on Debian in the past. =20 > My laptop > >> runs > >> Debian so I will try out your code tonight and see if I=20 > get the same=20 > >> 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 =20 > > /usr/local/moto/mx/codex/db/mysql/libmx_codex_db_mysql.so: undefined > > symbol: uncompress > > Feb 26 01:04:19 ERROR dl.c moto:=20 > undefined symbol:=20 > > __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 =3D #FFFFFF TEXT =3D #000000 marginheight=3D"0"=20 > > marginwidth=3D"0" topmargin=3D"0" leftmargin=3D"0" = onLoad=3D"Startup()"> > > > > ${ > > MySQLConnection conn =3D new=20 > > MySQLConnection("localhost","db","user","pass"); > > String tableName =3D "transactions"; > > String query =3D "select * from " + tableName; > > MySQLResultSet rset =3D conn.query(query); > > }$ > > > > $declare(int cols=3Drset.getColumns()) > > $declare(int i) > > $for(i=3D0;i<cols;i++) > > $(rset.getColumnName(i)) > > $endfor > > > > > > This is on a Debian Woody box. Other moto files are=20 > working fine, but=20 > > connecting to the database is giving me issues. Maybe the two=20 > > 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 =20