Re: [Zope] MySQL-python-1.2.2 ImportError
Well, I guess it was my bet ... solaris uses 'crle' for the ld configuration. I included the mysql-lib directory and it seems to work now. On Wed, 2009-01-21 at 06:20 +0530, Chetan Kumar wrote: > On Wed, Jan 21, 2009 at 3:19 AM, SolidEther wrote: > > ImportError: ld.so.1: python: fatal: libmysqlclient_r.so.16: open > > failed: No such file or directory > > Take care to compile MySQL with thread-safe option. > Cheers ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL-python-1.2.2 ImportError
Hi Everyone, I am having trouble to make use of a compiled version of MySQL- python-1.2.2 with Zope/Python under OpenSolaris snv_101b. I installed Zope/Plone (running) and need mysql-python to be compiled with the python version (2.4) that came with zope. I further compiled MySQL 5.1.30 and it is running fine. MySQL-python-1.2.2 actually builds and installs fine: [...] Installed /opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ MySQL_python-1.2.2-py2.4-solaris-2.11-i86pc.egg [...] But when I want to test the module with the zope-pyhton, I get this error: >>> import MySQLdb Traceback (most recent call last): File "", line 1, in ? File "build/bdist.solaris-2.11-i86pc/egg/MySQLdb/__init__.py", line 19, in ? File "build/bdist.solaris-2.11-i86pc/egg/_mysql.py", line 7, in ? File "build/bdist.solaris-2.11-i86pc/egg/_mysql.py", line 6, in __bootstrap__ ImportError: ld.so.1: python: fatal: libmysqlclient_r.so.16: open failed: No such file or directory Having a look at sys.path reveals: >>> print sys.path ['/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ setuptools-0.6c8-py2.4.egg', '/opt/Plone-3.1/Python-2.4/lib/python2.4/ site-packages/PILwoTk-1.1.6.3-py2.4-solaris-2.11-i86pc.egg', '/opt/ Plone-3.1/Python-2.4/lib/python2.4/site-packages/Cheetah-2.0.1-py2.4- solaris-2.11-i86pc.egg', '/opt/Plone-3.1/Python-2.4/lib/python2.4/site- packages/Paste-1.6-py2.4.egg', '/opt/Plone-3.1/Python-2.4/lib/ python2.4/site-packages/PasteDeploy-1.3.1-py2.4.egg', '/opt/Plone-3.1/ Python-2.4/lib/python2.4/site-packages/PasteScript-1.6.2-py2.4.egg', '/ opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ZopeSkel-1.8- py2.4.egg', '/opt/Plone-3.1/Python-2.4/lib/python2.4/site-packages/ MySQL_python-1.2.2-py2.4-solaris-2.11-i86pc.egg', '', '/opt/Plone-3.1/ Python-2.4/lib/python24.zip', '/opt/Plone-3.1/Python-2.4/lib/ python2.4', '/opt/Plone-3.1/Python-2.4/lib/python2.4/plat-sunos5', '/ opt/Plone-3.1/Python-2.4/lib/python2.4/lib-tk', '/opt/Plone-3.1/ Python-2.4/lib/python2.4/lib-dynload', '/opt/Plone-3.1/Python-2.4/lib/ python2.4/site-packages'] and further checking for 'libmysqlclient_r.so.16' (I added that sym- link later on): # ll /opt/Plone-3.1/Python-2.4/lib/python2.4/libmysqlclient_r.so.16 lrwxrwxrwx 1 root root 43 Jan 20 17:46 /opt/Plone-3.1/ Python-2.4/lib/python2.4/libmysqlclient_r.so.16 -> /opt/mysql/mysql/ lib/libmysqlclient_r.so.16* # ll /opt/mysql/mysql/lib/libmysqlclient_r.so.16 lrwxrwxrwx 1 root root 47 Dec 18 12:07 /opt/mysql/mysql/ lib/libmysqlclient_r.so.16 -> /opt/mysql/mysql/lib/libmysqlclient_r.so. 16.0.0* # ll /opt/mysql/mysql/lib/libmysqlclient_r.so.16.0.0 -rwxr-xr-x 1 root bin 5632336 Nov 15 20:35 /opt/mysql/mysql/ lib/libmysqlclient_r.so.16.0.0* So, actually everything is there. I am running out of ideas here. Any suggestions of how I could get this working? Thx & Cheers, Michael ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mysql and LOAD DATA INFILE
On 15.10.2008 13:16 Uhr, [EMAIL PROTECTED] wrote: hello everybody! this is a 50%zope and 50%mysql question..hope somebody here will help me..:-) in PC1: are running a mysql and zope+Plone server. A zsql method imports a csv file into mysql using a LOAD DATA LOCAL INFILE and all runs OK when the file is in the PC1 filesystem. I know that "LOCAL" is from the mysql server's point of view, in this case "LOCAL" should mean "where the mysql client is running" (the zope web server) Is there a way to let a remote Plone user (on a remote host) to enter his local file into the remote mysql server? I guess that the issue is entirely on the mysql side, but hope that zope will offer some kind of solution. Not sure what the background of your question is. According to the docs: LOAD DATA INLINE will read a file from the client host. So you must ensure that the data file is available on the machine where Plone/Zope is running. Where is the problem with that? -aj begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[EMAIL PROTECTED] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] mysql and LOAD DATA INFILE
hello everybody! this is a 50%zope and 50%mysql question..hope somebody here will help me..:-) in PC1: are running a mysql and zope+Plone server. A zsql method imports a csv file into mysql using a LOAD DATA LOCAL INFILE and all runs OK when the file is in the PC1 filesystem. I know that "LOCAL" is from the mysql server's point of view, in this case "LOCAL" should mean "where the mysql client is running" (the zope web server) Is there a way to let a remote Plone user (on a remote host) to enter his local file into the remote mysql server? I guess that the issue is entirely on the mysql side, but hope that zope will offer some kind of solution. hope to have been clear enough.. thanks, Stefano. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL reconnects on zope application level
On 16/07/2008 Peter Bengtsson wrote: > I don't have an easy answer but if you do dig into Andy's code and try > to implement this, I would suggest you look at the ZPsycopgDA code > perhaps and look for inspiration since I think that one works much > better. Thanks, but finally I found an easier solution :-) the 3.0 beta1 of ZMySQLDA seems to have this fixed. It doesn't allow to configure automatic reconnects, but it implements them defaultly. thanks for your help, greetings, jonas ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL reconnects on zope application level
I don't have an easy answer but if you do dig into Andy's code and try to implement this, I would suggest you look at the ZPsycopgDA code perhaps and look for inspiration since I think that one works much better. 2008/7/16 Jonas <[EMAIL PROTECTED]>: > Hello, > > On several zope 2.10.6 instances we discovered issues with database > connections to MySQL. Apparently MySQL seems to not automaticly > reconnect connections with a timeout since version 5.0.3 due to issues > with transactions. > > Until now, mysql-python was patched to restore that behaviour to > automatically reconnect timeouted connections, but that is not the case > anymore either. > > So from now on the database reconnects need to be done from zope > applications on their own. Unfortunately the ZMySQLda adapter by Andy > Dustman doesn't implement such a functionality. > > I cannot imagine that we are the only ones who discover this problem. Is > there an easy way to implement automatic reconnects for Z MySQL Database > Connections on zope application level? > > greetings, and thanks in advance, > jonas > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL reconnects on zope application level
Hello, On several zope 2.10.6 instances we discovered issues with database connections to MySQL. Apparently MySQL seems to not automaticly reconnect connections with a timeout since version 5.0.3 due to issues with transactions. Until now, mysql-python was patched to restore that behaviour to automatically reconnect timeouted connections, but that is not the case anymore either. So from now on the database reconnects need to be done from zope applications on their own. Unfortunately the ZMySQLda adapter by Andy Dustman doesn't implement such a functionality. I cannot imagine that we are the only ones who discover this problem. Is there an easy way to implement automatic reconnects for Z MySQL Database Connections on zope application level? greetings, and thanks in advance, jonas ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hi Tino, Is "I've never used Postgres before and all my web life experience is MySQL based" reason enough? :-) Thanks Hugo On Thu, Feb 21, 2008 at 3:31 PM, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Hugo Ramos wrote: > > Well, > > > > I went googling for this error... Google gives 1 (one) answer!!! The > > worst part is that it's related to django and mod_python. > > > > I guess nobody solved this yet... I'll have to go back to OS X 10.4 > (Tiger). > > You could also forward to Postgres :-) Unless you have a very specific > need for mysql... > > Regards > Tino > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hugo Ramos wrote: Well, I went googling for this error... Google gives 1 (one) answer!!! The worst part is that it's related to django and mod_python. I guess nobody solved this yet... I'll have to go back to OS X 10.4 (Tiger). You could also forward to Postgres :-) Unless you have a very specific need for mysql... Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hi Hugo. Yes, that's true but of course you have to consider all of the other frameworks that apple has already put on your machine. Much of the problem will come when linking the libraries when compiling. So in fact it is a bigger issue and requires much of the base software to recompiled using macports or on your own for a sound development machine. You can of course recompile these to create a framework build for your own architecture. You probably just need to keep in mind that mac is really only just FreeBSD/Darwin so things will compile in a normal mode without anything 'universal' involved. I just takes some effort. Regards, David Hugo Ramos wrote: Hello David, It makes sense to me! The only thing I was using as a binary was Python 2.4.4 universal binary. I guess if I was using Python from the source it should work then. Thank you very much. Hugo On Thu, Feb 21, 2008 at 3:01 AM, David Pratt <[EMAIL PROTECTED]> wrote: Hi Hugo. I believe 'file is not of required architecture' may be the clue here. Ever since mac went to universal binaries, folks with ppc have been having trouble since it is compiled with i386 arch flags and vice versa for folks with intel macs (with ppc arch flags). The only way to get around this is to compile a universal build, use universal binaries, or build for your own architecture. There is a large amount of software out there that does not do the right thing. For myself, I build my own software including python and I try and keep away from the universal insanity. On a mac, many folks use macports without the universal build. If you choose to build your own software, you can place it in the /opt directory to prevent it from affecting your system software. This is where your macports software will go if you use it. You will also need to modify your path to ensure that your compiled software is obtained over system software. I see that your issue was solved with a universal build. This probably just confirms what I have written. This may be alright until you run into the next snag with something else you need to compile. Personally, I got tired of the consistent problems trying to build software with the universal python. Regards, David Hugo Ramos wrote: > Hello Chetan, > > Well thank you very much! I must be very tired to forget to compile > MySQL without --enable-thread-safe-client !!! > It seems that MySQL-python now compiles with a warning: > > ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file > is not of required architecture > > But when I try to import _mysql in Python 2.4.4 shell it seems to > import the module with no errors. > > After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I > receive the following error: > > === > 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA > Traceback (most recent call last): > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 709, in import_product > product=__import__(pname, global_dict, global_dict, silly) > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > line 91, in ? > import DA > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ? > from db import DB > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ? > import _mysql > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > ImportError: Inappropriate file type for dynamic loading > Traceback (most recent call last): > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in ? > run() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in run > starter.prepare() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > line 102, in prepare > self.startZope() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > line 278, in startZope > Zope2.startup() > File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in startup > _startup() > File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line > 45, in startup > OFS.Application.import_products() > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 686, in import_products > import_product(product_dir, product_name, raise_exc=debug_mode) > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 709, in import_product > product=__import__(pname, global_dict, global_dict, silly) > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > line 91, in ? > import DA > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ? > from db import DB > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ? > import _my
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hello David, It makes sense to me! The only thing I was using as a binary was Python 2.4.4 universal binary. I guess if I was using Python from the source it should work then. Thank you very much. Hugo On Thu, Feb 21, 2008 at 3:01 AM, David Pratt <[EMAIL PROTECTED]> wrote: > Hi Hugo. I believe 'file is not of required architecture' may be the > clue here. Ever since mac went to universal binaries, folks with ppc > have been having trouble since it is compiled with i386 arch flags and > vice versa for folks with intel macs (with ppc arch flags). The only way > to get around this is to compile a universal build, use universal > binaries, or build for your own architecture. There is a large amount of > software out there that does not do the right thing. > > For myself, I build my own software including python and I try and keep > away from the universal insanity. On a mac, many folks use macports > without the universal build. If you choose to build your own software, > you can place it in the /opt directory to prevent it from affecting your > system software. This is where your macports software will go if you use > it. You will also need to modify your path to ensure that your compiled > software is obtained over system software. > > I see that your issue was solved with a universal build. This probably > just confirms what I have written. This may be alright until you run > into the next snag with something else you need to compile. Personally, > I got tired of the consistent problems trying to build software with the > universal python. > > Regards, > David > > > > Hugo Ramos wrote: > > Hello Chetan, > > > > Well thank you very much! I must be very tired to forget to compile > > MySQL without --enable-thread-safe-client !!! > > It seems that MySQL-python now compiles with a warning: > > > > ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file > > is not of required architecture > > > > But when I try to import _mysql in Python 2.4.4 shell it seems to > > import the module with no errors. > > > > After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I > > receive the following error: > > > > === > > 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA > > Traceback (most recent call last): > > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > > 709, in import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > > line 91, in ? > > import DA > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, > in ? > > from db import DB > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, > in ? > > import _mysql > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in > __bootstrap__ > > ImportError: Inappropriate file type for dynamic loading > > Traceback (most recent call last): > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, > in ? > > run() > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, > in run > > starter.prepare() > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > > line 102, in prepare > > self.startZope() > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > > line 278, in startZope > > Zope2.startup() > > File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in > startup > > _startup() > > File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line > > 45, in startup > > OFS.Application.import_products() > > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > > 686, in import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > > 709, in import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > > line 91, in ? > > import DA > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, > in ? > > from db import DB > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, > in ? > > import _mysql > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in > __bootstrap__ > > ImportError: Inappropriate file type for dynamic loading > > === > > > > Any ideas? > > > > ps: I'm posting this to zope list because I'm sure there is more > > people with this problem. > > > > > > tia > > > > Hugo > > > > > > On Feb 20, 2008 10:35 AM, Chetan Kumar <[EMAIL PROTECTED]
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hi Hugo. I believe 'file is not of required architecture' may be the clue here. Ever since mac went to universal binaries, folks with ppc have been having trouble since it is compiled with i386 arch flags and vice versa for folks with intel macs (with ppc arch flags). The only way to get around this is to compile a universal build, use universal binaries, or build for your own architecture. There is a large amount of software out there that does not do the right thing. For myself, I build my own software including python and I try and keep away from the universal insanity. On a mac, many folks use macports without the universal build. If you choose to build your own software, you can place it in the /opt directory to prevent it from affecting your system software. This is where your macports software will go if you use it. You will also need to modify your path to ensure that your compiled software is obtained over system software. I see that your issue was solved with a universal build. This probably just confirms what I have written. This may be alright until you run into the next snag with something else you need to compile. Personally, I got tired of the consistent problems trying to build software with the universal python. Regards, David Hugo Ramos wrote: Hello Chetan, Well thank you very much! I must be very tired to forget to compile MySQL without --enable-thread-safe-client !!! It seems that MySQL-python now compiles with a warning: ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file is not of required architecture But when I try to import _mysql in Python 2.4.4 shell it seems to import the module with no errors. After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I receive the following error: === 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA Traceback (most recent call last): File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line 709, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ? from db import DB File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ ImportError: Inappropriate file type for dynamic loading Traceback (most recent call last): File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in ? run() File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in run starter.prepare() File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", line 102, in prepare self.startZope() File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", line 278, in startZope Zope2.startup() File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in startup _startup() File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line 45, in startup OFS.Application.import_products() File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line 686, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line 709, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ? from db import DB File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ ImportError: Inappropriate file type for dynamic loading === Any ideas? ps: I'm posting this to zope list because I'm sure there is more people with this problem. tia Hugo On Feb 20, 2008 10:35 AM, Chetan Kumar <[EMAIL PROTECTED]> wrote: Hello I understand. If I could take the risk of "telling-the-obvious" what you need to do is to recompile mysql so that mysqlclient_r libraries are also created. --enable-thread-safe-client is to be used while configuring the mysql installation. If that is done already, the LD_LIBRARY_PATH (or equivalent in your case) if to set appropriately so that lmysqlclient_r is available for linking. Good luck Chetan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Man... I should buy you a drink at Lisbon when you decide to come here!!! :-) The binary package works fine now! I just wish someone would answer about the compilation warning and import error in Zope. Thank you very much Really appreciated Hugo On Wed, Feb 20, 2008 at 8:47 PM, Giampiero Benvenuti <[EMAIL PROTECTED]> wrote: > does it work? > > > > On Feb 20, 2008, at 10:07 AM, Hugo Ramos wrote: > > > Forget it... Just found the file at: > > http://pythonmac.org/packages/py24-fat/index.html > > > > > > Thanks a lot! > > Hugo > > > > > > On Feb 20, 2008 5:57 PM, Hugo Ramos <[EMAIL PROTECTED]> wrote: > >> Where did you get that file? MySQL-Python at sourceforge? > >> > >> > >> Thanks > >> > >> > >> On Feb 20, 2008 5:28 PM, Giampiero Benvenuti > >> > >> <[EMAIL PROTECTED]> wrote: > >>> I used MySQL_Python-1.2.1_p2-py2.4-macosx10.4.zip with 10.5 and It > >>> works > >>> just fine. > >>> > >>> Giampiero > >>> > >>> > >>> > >>> On Feb 20, 2008, at 8:52 AM, Hugo Ramos wrote: > >>> > >>> > >>> Well, > >>> > >>> I went googling for this error... Google gives 1 (one) answer!!! The > >>> worst part is that it's related to django and mod_python. > >>> > >>> I guess nobody solved this yet... I'll have to go back to OS X > >>> 10.4 (Tiger). > >>> > >>> omg... > >>> > >>> > >>> Thanks > >>> Hugo > >>> > >>> > >>> On Feb 20, 2008 12:31 PM, Hugo Ramos <[EMAIL PROTECTED]> wrote: > >>> Hello Chetan, > >>> > >>> Well thank you very much! I must be very tired to forget to compile > >>> MySQL without --enable-thread-safe-client !!! > >>> It seems that MySQL-python now compiles with a warning: > >>> > >>> ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, > >>> file > >>> is not of required architecture > >>> > >>> But when I try to import _mysql in Python 2.4.4 shell it seems to > >>> import the module with no errors. > >>> > >>> After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I > >>> receive the following error: > >>> > >>> === > >>> 2008-02-20 11:41:52 ERROR Application Could not import > >>> Products.ZMySQLDA > >>> Traceback (most recent call last): > >>> File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > >>> 709, in import_product > >>>product=__import__(pname, global_dict, global_dict, silly) > >>> File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/ > >>> __init__.py", > >>> line 91, in ? > >>>import DA > >>> File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", > >>> line 92, > >>> in ? > >>>from db import DB > >>> File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", > >>> line 89, > >>> in ? > >>>import _mysql > >>> File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > >>> File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in > >>> __bootstrap__ > >>> ImportError: Inappropriate file type for dynamic loading > >>> Traceback (most recent call last): > >>> File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", > >>> line 56, in > >>> ? > >>>run() > >>> File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", > >>> line 21, in > >>> run > >>>starter.prepare() > >>> File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > >>> line 102, in prepare > >>>self.startZope() > >>> File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > >>> line 278, in startZope > >>>Zope2.startup() > >>> File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line > >>> 47, in > >>> startup > >>>_startup() > >>> File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line > >>> 45, in startup > >>>OFS.Application.import_products() > >>> File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > >>> 686, in import_products > >>>import_product(product_dir, product_name, raise_exc=debug_mode) > >>> File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > >>> 709, in import_product > >>>product=__import__(pname, global_dict, global_dict, silly) > >>> File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/ > >>> __init__.py", > >>> line 91, in ? > >>>import DA > >>> File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", > >>> line 92, > >>> in ? > >>>from db import DB > >>> File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", > >>> line 89, > >>> in ? > >>>import _mysql > >>> File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > >>> File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in > >>> __bootstrap__ > >>> ImportError: Inappropriate file type for dynamic loading > >>> === > >>> > >>> Any ideas? > >>> > >>> ps: I'm posting this to zope list because I'm sure there is more > >>> people with this problem. > >>> > >>> > >>> tia > >>> > >>> Hugo > >>> > >>> > >>> > >>> On Feb 20, 2008 1
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Forget it... Just found the file at: http://pythonmac.org/packages/py24-fat/index.html Thanks a lot! Hugo On Feb 20, 2008 5:57 PM, Hugo Ramos <[EMAIL PROTECTED]> wrote: > Where did you get that file? MySQL-Python at sourceforge? > > > Thanks > > > On Feb 20, 2008 5:28 PM, Giampiero Benvenuti > > <[EMAIL PROTECTED]> wrote: > > I used MySQL_Python-1.2.1_p2-py2.4-macosx10.4.zip with 10.5 and It works > > just fine. > > > > Giampiero > > > > > > > > On Feb 20, 2008, at 8:52 AM, Hugo Ramos wrote: > > > > > > Well, > > > > I went googling for this error... Google gives 1 (one) answer!!! The > > worst part is that it's related to django and mod_python. > > > > I guess nobody solved this yet... I'll have to go back to OS X 10.4 (Tiger). > > > > omg... > > > > > > Thanks > > Hugo > > > > > > On Feb 20, 2008 12:31 PM, Hugo Ramos <[EMAIL PROTECTED]> wrote: > > Hello Chetan, > > > > Well thank you very much! I must be very tired to forget to compile > > MySQL without --enable-thread-safe-client !!! > > It seems that MySQL-python now compiles with a warning: > > > > ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file > > is not of required architecture > > > > But when I try to import _mysql in Python 2.4.4 shell it seems to > > import the module with no errors. > > > > After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I > > receive the following error: > > > > === > > 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA > > Traceback (most recent call last): > > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > > 709, in import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > > line 91, in ? > > import DA > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, > > in ? > > from db import DB > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, > > in ? > > import _mysql > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > > ImportError: Inappropriate file type for dynamic loading > > Traceback (most recent call last): > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in > > ? > > run() > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in > > run > > starter.prepare() > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > > line 102, in prepare > > self.startZope() > > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > > line 278, in startZope > > Zope2.startup() > > File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in > > startup > > _startup() > > File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line > > 45, in startup > > OFS.Application.import_products() > > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > > 686, in import_products > > import_product(product_dir, product_name, raise_exc=debug_mode) > > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > > 709, in import_product > > product=__import__(pname, global_dict, global_dict, silly) > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > > line 91, in ? > > import DA > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, > > in ? > > from db import DB > > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, > > in ? > > import _mysql > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > > ImportError: Inappropriate file type for dynamic loading > > === > > > > Any ideas? > > > > ps: I'm posting this to zope list because I'm sure there is more > > people with this problem. > > > > > > tia > > > > Hugo > > > > > > > > On Feb 20, 2008 10:35 AM, Chetan Kumar <[EMAIL PROTECTED]> wrote: > > > > Hello > > > > I understand. > > > > If I could take the risk of "telling-the-obvious" what you need to do > > > > is to recompile mysql so that mysqlclient_r libraries are also > > > > created. > > > > --enable-thread-safe-client is to be used while configuring the mysql > > > > installation. > > > > If that is done already, the LD_LIBRARY_PATH (or equivalent in your > > > > case) if to set appropriately so that lmysqlclient_r is available for > > > > linking. > > > > Good luck > > > > Chetan > > > > > > > > > > > > -- > > Hugo Ramos - [EMAIL PROTECTED] > > IT Project Manager > > > > ~~ @ ~~ > > http://www.orkut.com/Profile.aspx?uid=10082105466310142690 > > http://otuggapoesia.blogspot.com/ > > http://otugga.blogspot.com/ > > > > > > > > > > -- > > Hugo Ramos - [EMAIL PROTECTED] > > IT Project Ma
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Where did you get that file? MySQL-Python at sourceforge? Thanks On Feb 20, 2008 5:28 PM, Giampiero Benvenuti <[EMAIL PROTECTED]> wrote: > I used MySQL_Python-1.2.1_p2-py2.4-macosx10.4.zip with 10.5 and It works > just fine. > > Giampiero > > > > On Feb 20, 2008, at 8:52 AM, Hugo Ramos wrote: > > > Well, > > I went googling for this error... Google gives 1 (one) answer!!! The > worst part is that it's related to django and mod_python. > > I guess nobody solved this yet... I'll have to go back to OS X 10.4 (Tiger). > > omg... > > > Thanks > Hugo > > > On Feb 20, 2008 12:31 PM, Hugo Ramos <[EMAIL PROTECTED]> wrote: > Hello Chetan, > > Well thank you very much! I must be very tired to forget to compile > MySQL without --enable-thread-safe-client !!! > It seems that MySQL-python now compiles with a warning: > > ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file > is not of required architecture > > But when I try to import _mysql in Python 2.4.4 shell it seems to > import the module with no errors. > > After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I > receive the following error: > > === > 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA > Traceback (most recent call last): > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 709, in import_product > product=__import__(pname, global_dict, global_dict, silly) > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > line 91, in ? > import DA > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, > in ? > from db import DB > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, > in ? > import _mysql > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > ImportError: Inappropriate file type for dynamic loading > Traceback (most recent call last): > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in > ? > run() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in > run > starter.prepare() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > line 102, in prepare > self.startZope() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > line 278, in startZope > Zope2.startup() > File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in > startup > _startup() > File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line > 45, in startup > OFS.Application.import_products() > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 686, in import_products > import_product(product_dir, product_name, raise_exc=debug_mode) > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 709, in import_product > product=__import__(pname, global_dict, global_dict, silly) > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > line 91, in ? > import DA > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, > in ? > from db import DB > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, > in ? > import _mysql > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > ImportError: Inappropriate file type for dynamic loading > === > > Any ideas? > > ps: I'm posting this to zope list because I'm sure there is more > people with this problem. > > > tia > > Hugo > > > > On Feb 20, 2008 10:35 AM, Chetan Kumar <[EMAIL PROTECTED]> wrote: > > Hello > > I understand. > > If I could take the risk of "telling-the-obvious" what you need to do > > is to recompile mysql so that mysqlclient_r libraries are also > > created. > > --enable-thread-safe-client is to be used while configuring the mysql > > installation. > > If that is done already, the LD_LIBRARY_PATH (or equivalent in your > > case) if to set appropriately so that lmysqlclient_r is available for > > linking. > > Good luck > > Chetan > > > > > > -- > Hugo Ramos - [EMAIL PROTECTED] > IT Project Manager > > ~~ @ ~~ > http://www.orkut.com/Profile.aspx?uid=10082105466310142690 > http://otuggapoesia.blogspot.com/ > http://otugga.blogspot.com/ > > > > > -- > Hugo Ramos - [EMAIL PROTECTED] > IT Project Manager > > ~~ @ ~~ > http://www.orkut.com/Profile.aspx?uid=10082105466310142690 > http://otuggapoesia.blogspot.com/ > http://otugga.blogspot.com/ > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > > > _
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Well, I went googling for this error... Google gives 1 (one) answer!!! The worst part is that it's related to django and mod_python. I guess nobody solved this yet... I'll have to go back to OS X 10.4 (Tiger). omg... Thanks Hugo On Feb 20, 2008 12:31 PM, Hugo Ramos <[EMAIL PROTECTED]> wrote: > Hello Chetan, > > Well thank you very much! I must be very tired to forget to compile > MySQL without --enable-thread-safe-client !!! > It seems that MySQL-python now compiles with a warning: > > ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file > is not of required architecture > > But when I try to import _mysql in Python 2.4.4 shell it seems to > import the module with no errors. > > After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I > receive the following error: > > === > 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA > Traceback (most recent call last): > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 709, in import_product > product=__import__(pname, global_dict, global_dict, silly) > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > line 91, in ? > import DA > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in > ? > from db import DB > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in > ? > import _mysql > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > ImportError: Inappropriate file type for dynamic loading > Traceback (most recent call last): > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in ? > run() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in > run > starter.prepare() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > line 102, in prepare > self.startZope() > File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", > line 278, in startZope > Zope2.startup() > File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in > startup > _startup() > File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line > 45, in startup > OFS.Application.import_products() > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 686, in import_products > import_product(product_dir, product_name, raise_exc=debug_mode) > File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line > 709, in import_product > product=__import__(pname, global_dict, global_dict, silly) > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", > line 91, in ? > import DA > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in > ? > from db import DB > File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in > ? > import _mysql > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? > File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ > ImportError: Inappropriate file type for dynamic loading > === > > Any ideas? > > ps: I'm posting this to zope list because I'm sure there is more > people with this problem. > > > tia > > Hugo > > > > On Feb 20, 2008 10:35 AM, Chetan Kumar <[EMAIL PROTECTED]> wrote: > > Hello > > I understand. > > If I could take the risk of "telling-the-obvious" what you need to do > > is to recompile mysql so that mysqlclient_r libraries are also > > created. > > --enable-thread-safe-client is to be used while configuring the mysql > > installation. > > If that is done already, the LD_LIBRARY_PATH (or equivalent in your > > case) if to set appropriately so that lmysqlclient_r is available for > > linking. > > Good luck > > Chetan > > > > > > -- > Hugo Ramos - [EMAIL PROTECTED] > IT Project Manager > > ~~ @ ~~ > http://www.orkut.com/Profile.aspx?uid=10082105466310142690 > http://otuggapoesia.blogspot.com/ > http://otugga.blogspot.com/ > -- Hugo Ramos - [EMAIL PROTECTED] IT Project Manager ~~ @ ~~ http://www.orkut.com/Profile.aspx?uid=10082105466310142690 http://otuggapoesia.blogspot.com/ http://otugga.blogspot.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hello Chetan, Well thank you very much! I must be very tired to forget to compile MySQL without --enable-thread-safe-client !!! It seems that MySQL-python now compiles with a warning: ld: warning in /usr/local/mysql/lib/mysql/libmysqlclient_r.dylib, file is not of required architecture But when I try to import _mysql in Python 2.4.4 shell it seems to import the module with no errors. After that when I try to import ZMySQLDA 2.0.8 in Zope 2.10.5 I receive the following error: === 2008-02-20 11:41:52 ERROR Application Could not import Products.ZMySQLDA Traceback (most recent call last): File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line 709, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ? from db import DB File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ ImportError: Inappropriate file type for dynamic loading Traceback (most recent call last): File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 56, in ? run() File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/run.py", line 21, in run starter.prepare() File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", line 102, in prepare self.startZope() File "/usr/local/zope2.10.5/lib/python/Zope2/Startup/__init__.py", line 278, in startZope Zope2.startup() File "/usr/local/zope2.10.5/lib/python/Zope2/__init__.py", line 47, in startup _startup() File "/usr/local/zope2.10.5/lib/python/Zope2/App/startup.py", line 45, in startup OFS.Application.import_products() File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line 686, in import_products import_product(product_dir, product_name, raise_exc=debug_mode) File "/usr/local/zope2.10.5/lib/python/OFS/Application.py", line 709, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/__init__.py", line 91, in ? import DA File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/DA.py", line 92, in ? from db import DB File "/usr/local/zope2.10.5/instance1/Products/ZMySQLDA/db.py", line 89, in ? import _mysql File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in ? File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in __bootstrap__ ImportError: Inappropriate file type for dynamic loading === Any ideas? ps: I'm posting this to zope list because I'm sure there is more people with this problem. tia Hugo On Feb 20, 2008 10:35 AM, Chetan Kumar <[EMAIL PROTECTED]> wrote: > Hello > I understand. > If I could take the risk of "telling-the-obvious" what you need to do > is to recompile mysql so that mysqlclient_r libraries are also > created. > --enable-thread-safe-client is to be used while configuring the mysql > installation. > If that is done already, the LD_LIBRARY_PATH (or equivalent in your > case) if to set appropriately so that lmysqlclient_r is available for > linking. > Good luck > Chetan > -- Hugo Ramos - [EMAIL PROTECTED] IT Project Manager ~~ @ ~~ http://www.orkut.com/Profile.aspx?uid=10082105466310142690 http://otuggapoesia.blogspot.com/ http://otugga.blogspot.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Hey Kumar, I like to think that the amount of time I could make anyone here spend looking for something is VERY well spent. That link you sent me is just 1 of the about 50 I searched on google before posting the problem. :-) I can tell you now that cp, mv and ln are not the solution. I can also tell you that there's someone posting this and the patch to MySQL-python sourceforge site as a bug in the setup_posix.py file (which didn't solve my problem) Finally I can also tell you that after compiling MySQL 5.0.51a from source my /usr/local/mysql/lib and /usr/local/mysql/lib/mysql look like this: $ dir /usr/local/mysql/lib/ total 0 drwxr-xr-x 3 root wheel 102 Feb 20 01:55 . drwxr-xr-x 11 root wheel 374 Feb 20 01:56 .. drwxr-xr-x 14 root wheel 476 Feb 20 01:55 mysql $ dir /usr/local/mysql/lib/mysql/ total 3616 drwxr-xr-x 14 root wheel 476 Feb 20 01:55 . drwxr-xr-x 3 root wheel 102 Feb 20 01:55 .. -rw-r--r-- 1 root wheel 12168 Feb 20 01:55 libdbug.a -rw-r--r-- 1 root wheel 40048 Feb 20 01:55 libheap.a -rw-r--r-- 1 root wheel 351896 Feb 20 01:55 libmyisam.a -rw-r--r-- 1 root wheel 21128 Feb 20 01:55 libmyisammrg.a -rwxr-xr-x 1 root wheel 375120 Feb 20 01:55 libmysqlclient.15.0.0.dylib lrwxr-xr-x 1 root wheel 27 Feb 20 01:55 libmysqlclient.15.dylib -> libmysqlclient.15.0.0.dylib -rw-r--r-- 1 root wheel 492440 Feb 20 01:55 libmysqlclient.a lrwxr-xr-x 1 root wheel 27 Feb 20 01:55 libmysqlclient.dylib -> libmysqlclient.15.0.0.dylib -rwxr-xr-x 1 root wheel 877 Feb 20 01:55 libmysqlclient.la -rw-r--r-- 1 root wheel 262088 Feb 20 01:55 libmystrings.a -rw-r--r-- 1 root wheel 262940 Feb 20 01:55 libmysys.a -rw-r--r-- 1 root wheel5848 Feb 20 01:55 libvio.a I run out of ideas now... after 3 days searching and testing... HELP would be much appreciated. Thanks guys On Feb 20, 2008 3:08 AM, Chetan Kumar <[EMAIL PROTECTED]> wrote: > Discussion and solution here > http://forums.mysql.com/read.php?50,175059,180049 > Cheers!!! > Chetan > -- Hugo Ramos - [EMAIL PROTECTED] IT Project Manager ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL-python-1.2.2 breaks compiling on Mac OS X 10.5 (Andy Dustman?)
Yellow ppl, I'm having a problem I didn't have in OS X 10.4 (tiger)... When compiling MySQL-python-1.2.2 on OS X 10.5 (leopard) I get a very annoying error I'm not being able to solve. I've tried moving, copying and linking libraries around but nothing seems to work. Anyone seen this before? Andy? :-) Thanks = - Mac OS X 10.5.2 (intel) - MySQL 5.0.51a (compiled from source) - Python 2.4.4 - MySQL-python-1.2.2 = $ python setup.py build running build running build_py copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.4/MySQLdb running build_ext building '_mysql' extension creating build/temp.macosx-10.3-fat-2.4 gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/local/mysql/include/mysql -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c _mysql.c -o build/temp.macosx-10.3-fat-2.4/_mysql.o gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.4/_mysql.o -L/usr/local/mysql/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.macosx-10.3-fat-2.4/_mysql.so ld: library not found for -lmysqlclient_r collect2: ld returned 1 exit status ld: library not found for -lmysqlclient_r collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccR04Uyn.out (No such file or directory) error: command 'gcc' failed with exit status 1 = -- Hugo Ramos - [EMAIL PROTECTED] IT Project Manager ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySql connector error
Your right, the older mysql da I was using gave 'Shouldn't Load State When Connection is Closed'. It turns out that my DA is implemented correctly, but the database cursor is being persisted in another object(past transaction commit) as you noted. So, with some readjusting, the error seems resolvable. Thanks for the explanation! -Kevin Pelletier Vincent wrote: Le Samedi 25 Août 2007 17:07, Kevin a écrit : Intermittently, I recieve an error *Shouldn't load state for 0xf5f137 when the connection is closed * This means there is somewhere a reference to a persistent object which keeps it past transaction commit, which is a bad behaviour. I implemented this object because the standard mysql database adapter would fail if the connection was idle for some time with a similar kind of error. I *think* the error you previously got was not the same, but a "conection closed" from regular ZMySQLDA. It is because only the query is protected against such error (it causes a reconnection & query retry), but not the BEGIN query, which is of course issued first and causes the error to go up uncatched. I have a ZMySQLDA version which fixes this problem (an another tricky one), and it should get merged into upstream version in near future. You can grab it on: http://svn.erp5.org/erp5/trunk/products/ZMySQLDA/ Just one remark: a bug has been found in this version which causes problems if multiple connections with the same id exist in different places, due to a pooling mechanism used to fix the tricky bug. It will work just fine if you use site-scope unique ids - as it works for me - but you will get troubles if that's not the case. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySql connector error
Le Samedi 25 Août 2007 17:07, Kevin a écrit : > Intermittently, I recieve an error *Shouldn't load state for 0xf5f137 > when the connection is closed > * This means there is somewhere a reference to a persistent object which keeps it past transaction commit, which is a bad behaviour. > I implemented this object because the standard mysql database adapter > would fail if the connection was idle for some time with a similar kind > of error. I *think* the error you previously got was not the same, but a "conection closed" from regular ZMySQLDA. It is because only the query is protected against such error (it causes a reconnection & query retry), but not the BEGIN query, which is of course issued first and causes the error to go up uncatched. I have a ZMySQLDA version which fixes this problem (an another tricky one), and it should get merged into upstream version in near future. You can grab it on: http://svn.erp5.org/erp5/trunk/products/ZMySQLDA/ Just one remark: a bug has been found in this version which causes problems if multiple connections with the same id exist in different places, due to a pooling mechanism used to fix the tricky bug. It will work just fine if you use site-scope unique ids - as it works for me - but you will get troubles if that's not the case. -- Vincent Pelletier ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySql connector error
I have a mysqldb connector object based on http://svn.zope.org/mysqldbda/ under zope 2.9.7 Intermittently, I recieve an error *Shouldn't load state for 0xf5f137 when the connection is closed * I implemented this object because the standard mysql database adapter would fail if the connection was idle for some time with a similar kind of error. class MySQLdbAdapter(SimpleItem,ZopeDatabaseAdapter): ... def __call__(self): ... return connection there is an object stored, I call it and return the mysql cursor and use cursor to make queries ala the python module. Does this look famileir to anyone else, if so, how was the error overcome? -Kevin ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mysql Lock Unlock with zsql
--On 4. Mai 2007 17:34:23 +0200 [EMAIL PROTECTED] wrote: Hi, I must use mysql lock/unlock with zsql. I haven't found anything about it. There is any solutions? I must lock a table but i don't know how do it :( Since LOCK is a SQL statement you can *of course* integrate with ZSQL method which basically send the configured SQL statements straight down to the database server...where is the problem`? -aj pgpkMeOLY7PFs.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Mysql Lock Unlock with zsql
Hi, I must use mysql lock/unlock with zsql. I haven't found anything about it. There is any solutions? I must lock a table but i don't know how do it :( max ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mysql socket problem, MOSX 10.4.7
baiewola wrote at 2006-8-9 05:16 -0700: > ... >We can connect with PHP apps, Filemaker Pro, and MySQL client. However, >all Z MySQL database connections are broken. Here is the error: >OperationalError: (2002, "Can't connect to local MySQL server through >socket '/tmp/mysql.sock' (2)") > >After googling and reading this article >http://www.devshed.com/c/a/MySQL/Troubleshooting-Problems-with-MySQL-Programs/1/ >I think the problem is that the socket file is supposed to be at >/tmp/mysql.sock but it's not there. How does it get there? Usually, the server creates it on startup (when it is ready to accept connections there). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] mysql socket problem, MOSX 10.4.7
Yesterday I finally updated my MOSX Server 10.4.6 to 10.4.7. In addition to usual list of hosed configuration files and scripts, we now have a problem with Zope 2.7.x connecting to MySQL through a unix socket. We can connect with PHP apps, Filemaker Pro, and MySQL client. However, all Z MySQL database connections are broken. Here is the error: OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)") After googling and reading this article http://www.devshed.com/c/a/MySQL/Troubleshooting-Problems-with-MySQL-Programs/1/ I think the problem is that the socket file is supposed to be at /tmp/mysql.sock but it's not there. How does it get there? Can I copy it one from another (working) server and put it in that folder? It isn't present on my backup drive (which was supposed to be a complete bootable backup of the drive before the upgrade), so I don't know how we ever used the unix socket file - but we did! Thanks in advance! __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL queries in Python
On Tue, Aug 01, 2006 at 02:50:19PM -0400, Muk Yan wrote: > Dear Coveted Braintrust, > > I was wondering if anyone had any experience with MySQL queries in Python in > Zope: People have already answered your main question, but: > SELECT name > FROM person > WHERE ID = Never ever pass raw user input to a sql query! If you're not familiar with the phrase "sql injection"... google it :) The zope book relational databases chapter explains how to use which is one way to avoid the danger. -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL queries in Python
Usually you install the database adaptor ZMySQLDB and make queries through a ZSQL Method object. On Tue, 1 Aug 2006, Muk Yan wrote: > Dear Coveted Braintrust, > > I was wondering if anyone had any experience with MySQL queries in Python in > Zope: > > import MySQLdb > import string > > request = container.REQUEST > session = request.SESSION > > result = (context.aq_parent).selects.select_from_table() > > print result > return printed > > WHERE select.select_from_table() IS: > > SELECT name > FROM person > WHERE ID = > > I know the MySQL query works, but I get garbage results from the python > script (). All I > want is to contain the results of the SQL query in a list or container. > > Thanks and take care, > Muk Yan > -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL queries in Python
import MySQLdb This is probably redundant. import string request = container.REQUEST session = request.SESSION result = (context.aq_parent).selects.select_from_table() print result Assuming you want the person's name printed, change this line to: print result[0].name Think of the result from a ZSQL query as a list/iterator over the resulting rows. In your case I'm assuming there is only one person row w/ the given id, so there is only one row in the result, but you still have to explicitly de-reference it w/ its index. HTH, John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL queries in Python
--On 1. August 2006 14:50:19 -0400 Muk Yan <[EMAIL PROTECTED]> wrote: I know the MySQL query works, but I get garbage results from the python script (). All I want is to contain the results of the SQL query in a list or container. Zope Book 2.7 edition -> RDBMS chapter. The result object is an iterator will return a row of the resultset for each iteration. -aj pgpVcDD2jTQav.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL queries in Python
Have a look at this: http://www.zope.org/Members/spinwing/ZSQL_Results Jonathan - Original Message - From: Muk Yan To: zope@zope.org Sent: Tuesday, August 01, 2006 2:50 PM Subject: [Zope] MySQL queries in Python Dear Coveted Braintrust,I was wondering if anyone had any experience with MySQL queries in Python in Zope:import MySQLdbimport stringrequest = container.REQUESTsession = request.SESSIONresult = (context.aq_parent).selects.select_from_table()print resultreturn printedWHERE select.select_from_table() IS:SELECT nameFROM personWHERE ID = I know the MySQL query works, but I get garbage results from the python script (). All I want is to contain the results of the SQL query in a list or container. Thanks and take care,Muk Yan ___Zope maillist - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL queries in Python
Dear Coveted Braintrust,I was wondering if anyone had any experience with MySQL queries in Python in Zope:import MySQLdbimport stringrequest = container.REQUESTsession = request.SESSION result = (context.aq_parent).selects.select_from_table()print resultreturn printedWHERE select.select_from_table() IS:SELECT nameFROM personWHERE ID = I know the MySQL query works, but I get garbage results from the python script (). All I want is to contain the results of the SQL query in a list or container. Thanks and take care,Muk Yan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySql 5.0, ZMySQLDA and stored procedures
Cameron Beattie wrote at 2006-1-17 17:37 +1300: >I was getting the following error when attempting to call a stored procedure >via a Z SQL Method: >_mysql_exceptions.OperationalError: (1312, etc You consult your MySQL documentation to find out what the error code "1312" means... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySql 5.0, ZMySQLDA and stored procedures
Yeah, I put up a patch on the MySQLDb Sourceforge page a long time ago for that. Doing almost the same thing. Only I made it so you specify the client flag in the Zope connection object. Doesnt do any good for windows though, they still have a problem with the mysql lib. (I think I posted a bug on that too) GregOn 1/16/06, Cameron Beattie <[EMAIL PROTECTED]> wrote: I was getting the following error when attempting to call a stored procedurevia a Z SQL Method:_mysql_exceptions.OperationalError: (1312, etcSo I made the following change to/usr/lib/zope/lib/python/Products/ZMySQLDA/db.py: def _parse_connection_string(self, connection):kwargs = {'conv': self.conv, 'client_flag': 65536 #inserted by CSB }I then restarted Zope. I can now successfully call stored procedures. There may be a better way to do it. Feel free to advise if so.Apologies if this information has already been posted.Cameron___Zope maillist - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )-- Greg Fischer1st Byte Solutionshttp://www.1stbyte.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySql 5.0, ZMySQLDA and stored procedures
I was getting the following error when attempting to call a stored procedure via a Z SQL Method: _mysql_exceptions.OperationalError: (1312, etc So I made the following change to /usr/lib/zope/lib/python/Products/ZMySQLDA/db.py: def _parse_connection_string(self, connection): kwargs = {'conv': self.conv, 'client_flag': 65536 #inserted by CSB } I then restarted Zope. I can now successfully call stored procedures. There may be a better way to do it. Feel free to advise if so. Apologies if this information has already been posted. Cameron ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySql problems
Am Donnerstag, den 01.12.2005, 15:45 -0800 schrieb Dennis Allison: > I have not yet completed differential diagnosis, but I was hoping someone > had encountered a similar problem and could pass along a fix/workaround. > > The following program fails to do the writes -- > > import MySQLdb > initdb='test' > dbuser = 'root' > dbpass = 'XX' > host = 'localhost' > connection = MySQLdb.connect( db=initdb, user=dbuser, passwd=dbpass, > host=host ) > cursor = connection.cursor() > qd = "delete from test.data" > cursor.execute(qd) > qi = "insert into test.data values('ardvark', 'homework') " > print qi > cursor.execute( qi) > q2 = "select * from test.data" > cursor.execute( q2) > res = cursor.fetchall() > print res I see no connection.commit() there. Zope always commits (if all successfull) when a request is done. > when run with Mysql-Python-1.2.1c under Python 2.4.2, but works just > find with Mysql-Python-1.1.1 under Python 2.3.5. This mysql-python-1.1.1 might have something like autocommit switched on. The readme or changes.txt of both versions should tell you that. > The tables are Innodb tables (that is, transactional). (more or less ;) > Running Zope with Python 2.4.2 and Mysql-Pyton 1.2.1c works just fine. > Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySql problems
I have not yet completed differential diagnosis, but I was hoping someone had encountered a similar problem and could pass along a fix/workaround. The following program fails to do the writes -- import MySQLdb initdb='test' dbuser = 'root' dbpass = 'XX' host = 'localhost' connection = MySQLdb.connect( db=initdb, user=dbuser, passwd=dbpass, host=host ) cursor = connection.cursor() qd = "delete from test.data" cursor.execute(qd) qi = "insert into test.data values('ardvark', 'homework') " print qi cursor.execute( qi) q2 = "select * from test.data" cursor.execute( q2) res = cursor.fetchall() print res when run with Mysql-Python-1.2.1c under Python 2.4.2, but works just find with Mysql-Python-1.1.1 under Python 2.3.5. The tables are Innodb tables (that is, transactional). Running Zope with Python 2.4.2 and Mysql-Pyton 1.2.1c works just fine. Is there something special I need to do that I have forgotten? -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mysql 5? Just curious.
I guess it's not a matter of should, but rather a preference. I am running it just fine on Linux. Had to do some tweeks to the ZMySQLDA, but it works great. Stored Procedures and everything. I just havent seen hardly anyone testing it, so I thought I would ask around and see if others are running it too. GregOn 10/6/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: Greg Fischer schrieb:> This is totally unimportant, but I was just curious to know if anyone is> running Mysql 5 on Zope right now.why should one? :)-- Greg Fischer1st Byte Solutionshttp://www.1stbyte.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mysql 5? Just curious.
Greg Fischer schrieb: This is totally unimportant, but I was just curious to know if anyone is running Mysql 5 on Zope right now. why should one? :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mysql 5? Just curious.
Richard Smith wrote: A very quick test shows the basics work just fine (adding a record to a table and displaying the whole table). Just watch authentication - they've changed the password algorithms again as in the 3/4 upgrade. The work around is in the manual. rats, probably only an issue if someone's using MySQL encrypted passwords and SUF, and will require a patch to Zope. *sigh* Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Mysql 5? Just curious.
Greg Fischer wrote: This is totally unimportant, but I was just curious to know if anyone is running Mysql 5 on Zope right now. That would be some achievement! ISn't MySQL written in C++ or something? Seriously though, Andy Dustman is your man, maybe try compiling mySQLdb and seeing if it'll connect to MySQL 5? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Mysql 5? Just curious.
This is totally unimportant, but I was just curious to know if anyone is running Mysql 5 on Zope right now. -- Greg Fischer1st Byte Solutionshttp://www.1stbyte.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mysql-python build error
It turned out there were two different problems at work here. First, I had to hard code the paths of my include_dirs and include_lib. Second, I didn't realize my bash shell wasn't taking the export command. I had to edit my bash profile to set the mysqlclient environment variable (which is the path of the mysql installation). Thanks to everyone who responded! SG --- Sophia Grimm <[EMAIL PROTECTED]> wrote: > I installed Plone 2.1 from the binary installer at > plone.org and MySQL 4.1 from the binary at > mysql.com. > When attempting to build MySQL-python-1.2.0 on MOSX > 10.4.2 client, I get this error: > > sh: line 1: mysql_config: command not found > sh: line 1: mysql_config: command not found > running build > running build_py > running build_ext > building '_mysql' extension > gcc -bundle -undefined dynamic_lookup > build/temp.darwin-8.2.0-Power_Macintosh-2.3/_mysql.o > -L/usr/local/mysql/include -lz -lmysqld -o > build/lib.darwin-8.2.0-Power_Macintosh-2.3/_mysql.so > /usr/bin/ld: can't locate file for: -lmysqld > collect2: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > > Obviously, it's looking for -lmysqld. I don't know > where to change setup.py (or what to change it to) > so > this will work. Any tips are appreciated!! > > SG > > > > __ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] mysql-python build error
I installed Plone 2.1 from the binary installer at plone.org and MySQL 4.1 from the binary at mysql.com. When attempting to build MySQL-python-1.2.0 on MOSX 10.4.2 client, I get this error: sh: line 1: mysql_config: command not found sh: line 1: mysql_config: command not found running build running build_py running build_ext building '_mysql' extension gcc -bundle -undefined dynamic_lookup build/temp.darwin-8.2.0-Power_Macintosh-2.3/_mysql.o -L/usr/local/mysql/include -lz -lmysqld -o build/lib.darwin-8.2.0-Power_Macintosh-2.3/_mysql.so /usr/bin/ld: can't locate file for: -lmysqld collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Obviously, it's looking for -lmysqld. I don't know where to change setup.py (or what to change it to) so this will work. Any tips are appreciated!! SG __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] "error: release unlocked lock" with Zope/MySQL
[Reposted with a non-blank Subject field] We've been seeing this problem for some time. Earlier postings to the list were helpful in that we have eliminated possible causes, but the problem has never been resolved. Any assistance in tracking down the problem and fixing it would be greatly appreciated. Our configuration: Athlon dual processor machine RH7.3 Zope 2.7.6 with ZEO Python 2.4.1 (same problem occurs with Python 2.3.5) Mysql-Python 1.21.c3 ZMySQLDA 2.09b3 MySql-4.0.20 This is a fragment from the event log: 2005-06-07T16:06:42 ERROR(200) ZMySQLDA exception during _begin Traceback (most recent call last): File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 349, in _begin self.db.ping() OperationalError: (2013, 'Lost connection to MySQL server during query') -- 2005-06-07T16:06:42 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. The application will not be allowed to commit until the site/storage is reset by a restart. Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Transaction.py", line 377, in _finish_many jar.tpc_finish(self) File "/usr/local/src/zope/Zope2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 376, in _finish self._tlock.release() error: release unlocked lock -- 2005-06-07T16:06:42 ERROR(200) ZODB A storage error occured during object abort. This shouldn't happen. Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Transaction.py", line 412, in _commit_error j.tpc_abort(self) # This should never fail File "/usr/local/src/zope/Zope2.7/lib/python/Shared/DC/ZRDB/TM.py", line 63, in abort try: self._abort() File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 389, in _abort self._tlock.release() error: release unlocked lock -- 2005-06-07T16:06:42 ERROR(200) SiteError http://dev.agilemind.com/logged_in Traceback (most recent call last): File "/usr/local/src/zope/Zope2.7/lib/python/ZPublisher/Publish.py", line 107, in publish transactions_manager.commit() File "/usr/local/src/zope/Zope2.7/l[safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.-- 2005-08-06T20:47:21 ERROR(200) ZMySQLDA exception during _begin Traceback (most recent call last): File "/opt/zope/zproducts/standard/ZMySQLDA/db.py", line 349, in _begin self.db.ping() OperationalError: (2013, 'Lost connection to MySQL server during query') -- We get the "release unlocked lock" message occasionally, frequently but not always preceded by the connection lost message. Our my.cnf file for MySQL is [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock skip-innodb set-variable=max_connections=2048 set-variable=long_query_time=1 #log-bin=/var/log/mysql/epaul-bin #log-bin-index=/var/log/mysql/epaul-bin.index #log-slow-queries=/var/log/mysql/epaul-slow.log # change timeouts to close rather than wait # interactive == 1 hour, programs == 5 mins set-variable=interactive_timeout=3600 set-variable=wait_timeout=300 # uncomment to not log connection problems #set-variable=log-warnings=off [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid We use MyISAM tables and the MySQL autocommit mode rather than handling locks and transactions explicitly. >From a user perspective, refreshing the Zope page recovers from the error and allows one to continue working. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL timestamp issue
Yellow Andy, In fact what you've said works! That line was missing on db.py and after I inserted it there everything works the right way. I guess this thread is now over. Thanks!!! Cheers Hugo On 6/3/05, Andy Dustman <[EMAIL PROTECTED]> wrote: > On 6/3/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > > Yellow, > > > > I wrote the wrong version. > > I'm using MySQL 4.0.24 + Zope 276 + mysql-python 1.0.0 + ZMySQLDA 2.0.9b3 > > Take a look at ZMySQLDA/db.py: > > http://cvs.sourceforge.net/viewcvs.py/mysql-python/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py?rev=1.21&view=auto > > You may need to add a line like this to the DB class: > > conv[FIELD_TYPE.TIMESTAMP] = _mysql_timestamp_converter > > Not sure why this is missing. > > -- > Computer interfaces should never be made of meat. > http://www.terrybisson.com/meat.html > -- Hugo Ramos - [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL timestamp issue
On 6/3/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > Yellow, > > I wrote the wrong version. > I'm using MySQL 4.0.24 + Zope 276 + mysql-python 1.0.0 + ZMySQLDA 2.0.9b3 Take a look at ZMySQLDA/db.py: http://cvs.sourceforge.net/viewcvs.py/mysql-python/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py?rev=1.21&view=auto You may need to add a line like this to the DB class: conv[FIELD_TYPE.TIMESTAMP] = _mysql_timestamp_converter Not sure why this is missing. -- Computer interfaces should never be made of meat. http://www.terrybisson.com/meat.html ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL timestamp issue
Yellow, I wrote the wrong version. I'm using MySQL 4.0.24 + Zope 276 + mysql-python 1.0.0 + ZMySQLDA 2.0.9b3 This is the DTML code generating the error: docdataemissao is a timestamp field in a table like: 200406011023 The traceback: Error Type: ValueError Error Value: unsupported format character 'Y' (0x59) at index 1 [...] Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 703, in renderwob Module DocumentTemplate.DT_Var, line 280, in render __traceback_info__: ('docdataemissao', , {'': 'docdataemissao', 'fmt': '%Y-%m-%d'}) Any ideas??? Cheers Hugo On 6/3/05, Andy Dustman <[EMAIL PROTECTED]> wrote: > On 6/3/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > > I already know what exactly makes Zope hang! > > The problem is located at times.py that was installed by MySQL-Python > > 1.2.0 (MySQL-python.exe-1.2.0.win32-py2.4.zip) > > This is a package for Python-2.4. Are you using Python-2.4 with > Zope-2.7? If you are, the line of people prepared to yell at you is > long and distinquished. > > What version of ZMySQLDA are you using? Only 2.0.9b3 will work > properly with MySQLdb-1.2.0. > -- > Computer interfaces should never be made of meat. > http://www.terrybisson.com/meat.html > -- Hugo Ramos - [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL timestamp issue
On 6/3/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > I already know what exactly makes Zope hang! > The problem is located at times.py that was installed by MySQL-Python > 1.2.0 (MySQL-python.exe-1.2.0.win32-py2.4.zip) This is a package for Python-2.4. Are you using Python-2.4 with Zope-2.7? If you are, the line of people prepared to yell at you is long and distinquished. What version of ZMySQLDA are you using? Only 2.0.9b3 will work properly with MySQLdb-1.2.0. -- Computer interfaces should never be made of meat. http://www.terrybisson.com/meat.html ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL timestamp issue
I already know what exactly makes Zope hang! The problem is located at times.py that was installed by MySQL-Python 1.2.0 (MySQL-python.exe-1.2.0.win32-py2.4.zip) ==OLD== def mysql_timestamp_converter(s): """Convert a MySQL TIMESTAMP to a Timestamp object.""" s = s + "0"*(14-len(s)) # padding parts = map(int, filter(None, (s[:4],s[4:6],s[6:8], s[8:10],s[10:12],s[12:14]))) try: return apply(Timestamp, tuple(parts)) except: return None ==OLD== HACKED import DateTime def mysql_timestamp_converter(s): """Convert a MySQL TIMESTAMP to a Timestamp object.""" s = s + "0"*(14-len(s)) # padding parts = map(int, filter(None, (s[:4],s[4:6],s[6:8], s[8:10],s[10:12],s[12:14]))) try: return apply(DateTime.DateTime, tuple(parts)) except: return None HACKED Oren Goldschmidt helped me here and we just made a very nasty hack... As you can see we imported DateTime and replaced the Timestamp inside the try statement. This makes Zope behave!!! But it's a nasty hack that could break other stuff around there. Comments??? Cheers Hugo On 6/3/05, Chris Withers <[EMAIL PROTECTED]> wrote: > Hugo Ramos wrote: > > Could anyone explain me why this works in Zope 2.7.0 final and doesn't > > work in Zope 2.7.6 final and/or 2.8.0b1 ?? > > If Zope is really hanging, look at DeadlockDebugger and find out where > it's hanging... > > Chris > > -- > Simplistix - Content Management, Zope & Python Consulting > - http://www.simplistix.co.uk > > -- Hugo Ramos - [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL timestamp issue
Hugo Ramos wrote: Could anyone explain me why this works in Zope 2.7.0 final and doesn't work in Zope 2.7.6 final and/or 2.8.0b1 ?? If Zope is really hanging, look at DeadlockDebugger and find out where it's hanging... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL timestamp issue
Yellow, Could anyone explain me why this works in Zope 2.7.0 final and doesn't work in Zope 2.7.6 final and/or 2.8.0b1 ?? also when I try this: Zope hangs!!! ps: timestampvar is a timestamp var comming from MySQL 4.0.24 tia -- Hugo Ramos - [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MYSQL Problem
On Sun, 28 Jan 2001, Jens Grewen wrote: > I installed > > mySQL-3.23.32 > mySQLdb 0.3.1 > ZmySQLDA 2.0.4 > > When I change to mediumint (database field description) I get the > expected 233. > > How can I fix this. You just did. :) If a mediumint is big enough for you, use that. As Ron points out, INTEGER (particularly UNSIGNED) can overflow in Python, so they need to be returned as Python long integers. Python adds the L when doing str(), but Python 2.0+ does not do this (only on repr()). -- Andy Dustman PGP: 0xC72F3F1D @ .net http://dustman.net/andy "Normally with carbonara you use eggs, but I used lobster brains instead." -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MYSQL Problem
The trailing L identifies a long int in Python. As of ZMySQLDA 2.0.4, MySQL integers use Python longs because an unsigned MySQL integer could overflow a Python int. So, it's a bug fix. A couple solutions (found at http://dustman.net/andy/python/ZMySQLDA/2.0.4) are to use or something similar to strip the L, or use Python 2.x, which would not display the L in this case. You could also modify MySQLDA to use a Python int if you know you're not going to have integers that will overflow. Note that Python 2 is not officially supported by Digital Creations, though it does happen to work with Zope 2.3.0. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jens Grewen Sent: Saturday, January 27, 2001 11:36 PM To: Zope Maillist Subject: [Zope] MYSQL Problem >From the following SQL statment I get the result 233L and not 233 as expected select count(PID) from product When I run this SQL Statment from another program I get the expected value 233. In my installation there are a lot of Z SQL Methods that should return an int value and when I use field description int in the database I always get this 'L' behind the expected result. A lot of things don´t work because of this. When I change to mediumint (database field description) I get the expected 233. How can I fix this. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MYSQL Problem
I installed mySQL-3.23.32 mySQLdb 0.3.1 ZmySQLDA 2.0.4 on Win98 From the following SQL statment I get the result 233L and not 233 as expected select count(PID)from product When I run this SQL Statment from another program I get the expected value 233. In my installation there are a lot of Z SQL Methods that should return an int value and when I use field description int in the database I always get this 'L' behind the expected result. A lot of things don´t work because of this. When I change to mediumint (database field description) I get the expected 233. How can I fix this. Thanks Jens
Re: [Zope] MySQL
On Fri, 26 Jan 2001, Piotr Kozbial wrote: > I have upgraded to MySQL 3.23.28 and both ZMySQLDA and ZMySQLTDA were > broken.Thus I have installed latest > ZMySQLDA-2.0.4 and MySQLdb 0.3.1. MySQL-3.23.32 would be a good idea. It has at least one security fix, and a lot of bug fixes. > Ufter upgrade it does not work. > File /opt/www/zope/lib/python/DocumentTemplate/DT_In.py, line 711, in > renderwob > (Object: single_id_hasla2) > KeyError: (see above) I have no idea for that one. > I am unable to use TIMESTAMP from database > ie.: > File /opt/www/zope/lib/python/Products/ZMySQLDA/db.py, line 104, in > _mysql_timestamp_converter > ValueError: (see above) Can you find out what the value is that it doesn't like? > What is wrong. Is is MySQL or ZOPE or ZMySQLDA problem? Possibly ZMySQLDA. I would need to see specifically what the error message is that comes with the ValueError exception. -- Andy Dustman PGP: 0xC72F3F1D @ .net http://dustman.net/andy "Normally with carbonara you use eggs, but I used lobster brains instead." -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL
I have upgraded to MySQL 3.23.28 and both ZMySQLDA and ZMySQLTDA were broken.Thus I have installed latest ZMySQLDA-2.0.4 and MySQLdb 0.3.1. Ufter upgrade it does not work. I am able to search pages, ie.: http://arete.ibb.waw.pl/html/leksykon/cd_rom_report_en?nazwa_angielska=b but I am unable to display single records, ie.: http://arete.ibb.waw.pl/html/leksykon/single_record_report_hasla2?nazwa_ident_hasla2=933 Traceback (innermost last): File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /opt/www/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /opt/www/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: NowehaslaReplyForm) File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: NowehaslaReplyForm) File /opt/www/zope/lib/python/OFS/DTMLDocument.py, line 189, in __call__ (Object: NowehaslaReplyForm) File /opt/www/zope/lib/python/DocumentTemplate/DT_String.py, line 538, in __call__ (Object: NowehaslaReplyForm) File /opt/www/zope/lib/python/DocumentTemplate/DT_In.py, line 711, in renderwob (Object: single_id_hasla2) KeyError: (see above) I am unable to use TIMESTAMP from database ie.: Traceback (innermost last): File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /opt/www/zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /opt/www/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: search_report_pl) File /opt/www/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: search_report_pl) File /opt/www/zope/lib/python/OFS/DTMLMethod.py, line 189, in __call__ (Object: search_report_pl) File /opt/www/zope/lib/python/DocumentTemplate/DT_String.py, line 538, in __call__ (Object: search_report_pl) File /opt/www/zope/lib/python/DocumentTemplate/DT_In.py, line 480, in renderwb (Object: simple_search_pl) File /opt/www/zope/lib/python/Shared/DC/ZRDB/DA.py, line 488, in __call__ (Object: simple_search_pl) File /opt/www/zope/lib/python/Shared/DC/ZRDB/DA.py, line 435, in _cached_result (Object: simple_search_pl) File /opt/www/zope/lib/python/Products/ZMySQLDA/db.py, line 231, in query File /opt/www/zope/lib/python/Products/ZMySQLDA/db.py, line 104, in _mysql_timestamp_converter ValueError: (see above) What is wrong. Is is MySQL or ZOPE or ZMySQLDA problem? Regards, Piotr -- _ Piotr Kozbial http://arete.ibb.waw.pl ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL connection string.
Indra Gunawan wrote: > Hello, > could anyone tell me how to make connection string to MySQL in Linux? > I use Zope 2.3 and I've tried the > > database@[host] username password This should work. Your problem is probably somewhere else. Are you sure that the database adapter, database etc. are all set up correctly? Joachim. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL connection string.
Hello, could anyone tell me how to make connection string to MySQL in Linux? I use Zope 2.3 and I've tried the database@[host] username password format, and still no luck, TIA, -IGUN- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mysql connection string
On Mon, 15 Jan 2001, Olaf Zanger wrote: > right now my setup uses a connection string "db root" which doesn't seam > to give a lot of savety :-). > at my provider i have a login, but sure no root access to the db. > * how does the connection string look for user name "peter-hauser" and > password "test3-.2"? [EMAIL PROTECTED] peter-hauser test3-.2 <--\ | > * has the user to be set up in "linux" ? | | No, only in mysql. | | > * how is the setup made in "mysql"? | | GRANT select,insert,update,delete,create,alter,drop,index| ON db.* TO [EMAIL PROTECTED] INDENTIFIED BY 'test3-.2';| | > * has zope to be run by user "peter-hauser"? | | No, you pass peter-hauser in the connection string >-/ Oleg. Oleg Broytmann http://www.zope.org/Members/phd/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] mysql connection string
hi there, two times trouble first: right now my setup uses a connection string "db root" which doesn't seam to give a lot of savety :-). at my provider i have a login, but sure no root access to the db. * how does the connection string look for user name "peter-hauser" and password "test3-.2"? * has the user to be set up in "linux" ? * how is the setup made in "mysql"? i tried with "grant all privileges on *.* to "peter-hauser"@localhost;" and "set password for "peter-hauser"=password('test3-.2');" but wasn't successful. * has zope to be run by user "peter-hauser"? second? to set up a 3-tier application i should know how to connect mysql through MySQL-python 0.3.0 and ZMySQLDA 2.0.1 to my db-server. * i can browse from the zope server to the db-server "pit" and otherway round with the names "pit" and "pitechon", so "hosts" file should be correct. * how has the connection string to look like? i tried "db@pit 'peter-hauser'" but it didn't work? * has mysql to be started with an special flag to open a port? * does it work with the ip-number? thanks for help olaf -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Marc Zanger Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.soli-con.com begin:vcard n:Zanger;Olaf Marc tel;cell:+41-76-572 9782 tel;work:+41-31-332 9782 x-mozilla-html:FALSE url:www.soli-con.com org:soli-con Engineering Zanger adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland version:2.1 email;internet:[EMAIL PROTECTED] title:Dipl.-Ing. note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A x-mozilla-cpt:;-32176 fn:Olaf Zanger end:vcard
Re: [Zope] MySQL
Hi, I did not get mySQL running using the HOW-TO below. It seems to be outdated, as there is not need for patching anymore. The following HOW-TO is newer; http://www.zope.org/Members/MikeP/ZMySQLDA. I had mySQL up and running in no time when following this HOW-TO. If you are using mySQL on WIN32 use the following HOW-TO: http://www.zope.org/Members/philh/mysql, and download all the files this HOW-TO refers to, instead of compiling your own (if you don't know exactly what you are doing). I don't want to sound negative, but someone should really tidy up these HOW-TOs for mySQL and remove the old ones. What caused me most trouble when installing mySQL for the first time was to find the correct HOW-TO. Q: Are there any person responsible for the HOW-TO's? Suggestion: Now that there are many persons working with Zope, writing HOW-TO's etc - would it be an idea to create categories for the different HOW-TO's and that each category should have a maintainer, responsible for removing old HOW-TO's or at least clearly state which version of the products they are valid for? I could take responsibility for one category ... I think this could improve the quality of the available documentation. Best regards Petter Enholm Also: - Original Message - From: "Eric Walstad" <[EMAIL PROTECTED]> To: "vishnu prasad" <> Cc: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Wednesday, January 10, 2001 12:32 AM Subject: RE: [Zope] MySQL > http://www.zope.org/Members/alanpog/zmysqlda_steps > Should get you started... > Eric. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of vishnu > prasad > Sent: Tuesday, January 09, 2001 3:17 PM > To: [EMAIL PROTECTED] > Subject: [Zope] MySQL > > > can anyone update me with list of activities that I need to follow for > having MySQL installed and integrated with Zope? > > thanks in advance, > vp > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL
http://www.zope.org/Members/alanpog/zmysqlda_steps Should get you started... Eric. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of vishnu prasad Sent: Tuesday, January 09, 2001 3:17 PM To: [EMAIL PROTECTED] Subject: [Zope] MySQL can anyone update me with list of activities that I need to follow for having MySQL installed and integrated with Zope? thanks in advance, vp ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL
can anyone update me with list of activities that I need to follow for having MySQL installed and integrated with Zope? thanks in advance, vp
RE: [Zope] MySQL connection woes
One other bizarre symptom: when I test the database connection with a INSERT query it works and inserts data into the designated MySQL table in the query, although there is no indication that it is working in Zope. I changed the user table for the MySQL user cited in the connection string so that all privileges are on and still no luck. P. Johnson >>For a quick test, run the mysql client from the command line. >> >>Let's say your connection string was: >> foodb paul passwd >> >>Start mysql like this: >>$ mysql -u paul -p foodb >> >>And when prompted for the password, enter passwd. >> >>This will ensure mysql is setup correctly. Make sure you do this from >>the same machine that is running Zope, as MySql can be configured for >>different access from different machines. >> >>If you want to play with "null" passwords and such, look at the >>mysql.user and mysql.db tables. Remember to run "mysqladmin >>flush-privileges" after making changes to the user and db tables. > >This last part I did not know, thanks! > >Ok, I am getting closer. I finally found a connection string that Zope >accepts, but now when I test the connection with a query like "SHOW >TABLES;" or a SELECT query it I get the message: > > "There was no data matching this Z MySQL Database Connection >(connected) query." > >- even though I know these tables exist. The connection says that it is >open and it will only accept connection strings of databases that really >exist in MySQL. >INFO: >MySQL user name: root >hostname: www.myhost.com >password: none > >Zope Connection string: [EMAIL PROTECTED] root > >In the grant tables there is the following entries: >In user: [EMAIL PROTECTED] with no privileges >In db: [EMAIL PROTECTED] with all privileges for mydatabase.* except for >Grant_priv > >One other parameter that may have a bearing: the box's name is >station99.ispname.net even though it hosts www.myhost.com (or is it the >other way around?). > >Any suggestions why the connection is not working properly? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL connection woes
"Randall F. To: <[EMAIL PROTECTED]> Kern"cc: 01/09/01 12:08 PM >For a quick test, run the mysql client from the command line. > >Let's say your connection string was: > foodb paul passwd > >Start mysql like this: >$ mysql -u paul -p foodb > >And when prompted for the password, enter passwd. > >This will ensure mysql is setup correctly. Make sure you do this from >the same machine that is running Zope, as MySql can be configured for >different access from different machines. > >If you want to play with "null" passwords and such, look at the >mysql.user and mysql.db tables. Remember to run "mysqladmin >flush-privileges" after making changes to the user and db tables. This last part I did not know, thanks! Ok, I am getting closer. I finally found a connection string that Zope accepts, but now when I test the connection with a query like "SHOW TABLES;" or a SELECT query it I get the message: "There was no data matching this Z MySQL Database Connection (connected) query." - even though I know these tables exist. The connection says that it is open and it will only accept connection strings of databases that really exist in MySQL. INFO: MySQL user name: root hostname: www.myhost.com password: none Zope Connection string: [EMAIL PROTECTED] root In the grant tables there is the following entries: In user: [EMAIL PROTECTED] with no privileges In db: [EMAIL PROTECTED] with all privileges for mydatabase.* except for Grant_priv One other parameter that may have a bearing: the box's name is station99.ispname.net even though it hosts www.myhost.com (or is it the other way around?). Any suggestions why the connection is not working properly? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL connection woes
I don't know how to create a null login in MySQL, but I know a better solution. The last time I had a problem like yours I created a user in MySQL and used it connect Zope. In mysql you type: GRANT ALL ON my_database.* TO my_user IDENTIFIED BY my_passwd (The .* part is a wildcard meaning all tables in this database.) Then you can connect Zope using a connection string like this: my_user@localhost my_passwd Good luck, Luciano PS. [EMAIL PROTECTED] wrote: > > After following several howtos, tracking numerous threads from this list, > and spending several days losing my mind, I sense that I am finally getting > closer to having Zope and MySQL talking to each other. > > SETUP: > I am running on Linux with Redhat with MySQL 3.22.32 and ZMySQLDA with > ZMySQL-python. The later two are installed such that ZMySQLDA is NOT > broken. I installed using the RPMs supplied by Ron Bickers available on his > FTP site (thanks, Ron) and followed additional instructions supplied on > earlier threads. > > PROBLEM: > My problem now is I can't find a connection string that works. I understand > the connection syntax and tried every possibility. My suspicion is that I > am having a permissions problem with MySQL. I found this former list email: > > >> My suggestion would be to set up mysql to accept a null login (no > >> username, no password), create a database in there called "test" and > >> connect with the connection string "test@localhost" > > >thank u, this was the point to my problem. I have tried a nologin mysql > and it > >worked with database@myhost !!! :) > >so i know i have a grant table problem in mysql (no big deal - i hope :) ) > > QUESTION: > Being a relative newbie to this whole thing (Linux, Zope, MySQL, etc.), how > do I create a null login in MySQL with blanket privleges? Could it still be > a faulty ZMySQLDA setup? How do I troubleshoot that possibility? > > Thanks, > > P. Johnson > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL connection woes
After following several howtos, tracking numerous threads from this list, and spending several days losing my mind, I sense that I am finally getting closer to having Zope and MySQL talking to each other. SETUP: I am running on Linux with Redhat with MySQL 3.22.32 and ZMySQLDA with ZMySQL-python. The later two are installed such that ZMySQLDA is NOT broken. I installed using the RPMs supplied by Ron Bickers available on his FTP site (thanks, Ron) and followed additional instructions supplied on earlier threads. PROBLEM: My problem now is I can't find a connection string that works. I understand the connection syntax and tried every possibility. My suspicion is that I am having a permissions problem with MySQL. I found this former list email: >> My suggestion would be to set up mysql to accept a null login (no >> username, no password), create a database in there called "test" and >> connect with the connection string "test@localhost" >thank u, this was the point to my problem. I have tried a nologin mysql and it >worked with database@myhost !!! :) >so i know i have a grant table problem in mysql (no big deal - i hope :) ) QUESTION: Being a relative newbie to this whole thing (Linux, Zope, MySQL, etc.), how do I create a null login in MySQL with blanket privleges? Could it still be a faulty ZMySQLDA setup? How do I troubleshoot that possibility? Thanks, P. Johnson ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mySQL DA on Win32
I came across links that recommended recompiling both MySQL and the MySQL DA. I did so without too much difficuly. The batch compile scripts did not work, but compiling through the MicroSoft IDE did work. The source code I pulled down required the Microsoft compiler, not gcc++. I still have the download files. I could also send you the results of my compilations. I do not remember the URL's I used to get these files, but it was probably through the mysql web site. Lee Reilly CS1997 wrote: > Hi, > > Zope is currently being installed on the Unix machines at my uni but it > won't be available for a while. However, I have set up a mySQL database > in the Dept. and installed Zope on a Dept. machine (Windows 95). I can > only access the database from uni so I must have a database adpater > setup on this machine. > > I have seen the mySQL DA on Zope.org but I understand that it "does not > support win32 platforms at this time". I need database access ASAP so > can anyone offer any advice? > > Thanks very much, > > Lee > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) -- Lloyd Kvam Venix Corp. 1 Court Street, Suite 378 Lebanon, NH 03766-1358 voice: 603-443-6155 fax: 801-459-9582 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] mySQL DA on Win32
Couldn't one just use MyODBC and the ODBC DA? What disadvantages (besides latency from yet another API to go through) are there to this approach? Sean ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mySQL DA on Win32
Hi, Lee I got zope and mysql working together last night on win2k. I used the instructions in http://www.zope.org/Members/philh/mysql (Thanks, Phil Harris!) I did have to use the custom dll and pyd mentioned there. http://www.google.com/search?q=mysql+zope+win32 might have more clues if this does not meet your needs. To answer your next question, the connection string is like 'db@host username password' hth, -- Jim Washington Lee Reilly CS1997 wrote: > > Hi, > > Zope is currently being installed on the Unix machines at my uni but it > won't be available for a while. However, I have set up a mySQL database > in the Dept. and installed Zope on a Dept. machine (Windows 95). I can > only access the database from uni so I must have a database adpater > setup on this machine. > > I have seen the mySQL DA on Zope.org but I understand that it "does not > support win32 platforms at this time". I need database access ASAP so > can anyone offer any advice? > > Thanks very much, > > Lee ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mySQL DA on Win32
> From: "Lee Reilly CS1997" <[EMAIL PROTECTED]> > > I have seen the mySQL DA on Zope.org but I understand that it "does not > support win32 platforms at this time". I need database access ASAP so > can anyone offer any advice? There is a HOW-TO for this: How-To: ZMySQLDA on Win32 Search for it on www.zope.org. I run Zope and mySQL (3.23.28-gamma) on Win95. Advice; download the files as specified in the how-to. I tried to use the .dll file that we're installed with mySQL - crashed Python/Zope. Also, remember to store Python files in correct Python directory if you have installed more than one version / installation of Python. Best regards Petter Enholm Snapper ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mySQL DA on Win32
Lee, Have you read the MySQL on Win32 howto? btw, give my regards to Duncan. Phil [EMAIL PROTECTED] - Original Message - From: "Lee Reilly CS1997" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 14, 2000 2:46 PM Subject: [Zope] mySQL DA on Win32 > Hi, > > Zope is currently being installed on the Unix machines at my uni but it > won't be available for a while. However, I have set up a mySQL database > in the Dept. and installed Zope on a Dept. machine (Windows 95). I can > only access the database from uni so I must have a database adpater > setup on this machine. > > I have seen the mySQL DA on Zope.org but I understand that it "does not > support win32 platforms at this time". I need database access ASAP so > can anyone offer any advice? > > Thanks very much, > > Lee > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] mySQL DA on Win32
Hi, Zope is currently being installed on the Unix machines at my uni but it won't be available for a while. However, I have set up a mySQL database in the Dept. and installed Zope on a Dept. machine (Windows 95). I can only access the database from uni so I must have a database adpater setup on this machine. I have seen the mySQL DA on Zope.org but I understand that it "does not support win32 platforms at this time". I need database access ASAP so can anyone offer any advice? Thanks very much, Lee ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mysql & zope
Alexander DePauli writes: > ... using Zope management interface with custom objects ... The form actions of the Zope management interface are not built in. They are methods of the managed objects. This implies, if your objects override these management method, you get different behaviour. I am not sure, whether ZClass'es will allow you to override the methods. If not, you will need special Python base classes that implement the basic infrastructure for you ZClasses. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL
http://www.zope.org/Members/alanpog/zmysqlda_steps -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of K H Subrahmanyan Sent: Thursday, November 30, 2000 4:08 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [Zope] MySQL hi, I want to add MySQL to my ZOPE. Please help me in installing it. Please give the links, necessary information. thanks bye subrahmayan. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mysql & zope
Hi Ruediger, You might consider ZPatterns. It allows you to develop applications with ZODB, and then, later, 'easily' switch to other forms of attribute storage for your objects. -steve > "Alexander" == Alexander DePauli <[EMAIL PROTECTED]> writes: Alexander> Hi Zopistas! Alexander> we are looking for a method to do a better integration Alexander> of mysql 3.23.27 with zope 2.2.2. (we are using the Z Alexander> MySQL database adapter Z MySQL DA 1.1.3.) Alexander> We have to store data in a mysql database - we can´t Alexander> use ZODB because we need the data accessible by other Alexander> programs via ODBC. Alexander> We habe implemented several ZClasses like "customer", Alexander> "product" and "orders". We store their instances Alexander> (eg. each product, customer and so on) to the Alexander> mysql-database. Alexander> Our problem: we can´t use the standard ZOPE management Alexander> interface to manage the objects, because the methods of Alexander> this interface store content to the ZODB - and not to Alexander> the mysql-database. Alexander> Is there a way to extend the standard ZOPE management Alexander> interface with additional mysql statements? For Alexander> example: we select an object in a zope folder, press Alexander> the ZOPE Delete-Button, then this object is deleted on Alexander> the mysql-database, not on the ZODB? Alexander> For each zclass (customer, products, orders) we need Alexander> these extra methods (Delete, Update, Insert ...), so Alexander> our thought is that we would prefer to use the ZOPE Alexander> management interface to do this instead of programming Alexander> "extra methods" which obviously can't be used within Alexander> the standard ZOPE management interface. Alexander> Hope there is somebody out there with an similarly Alexander> problem solved. Alexander> best regards Alexander> Ruediger ~ Alexander> http://www.herrenausstatter.de - Der Alexander> Online-Herrenausstatter Kostenlose Serviceline: 0800 Alexander> -999 66 33 Versandkostenfreie Lieferung - 30 Tage Alexander> Rückgaberecht ~ Alexander> Verwaltungsadresse: DePauli.com Aktiengesellschaft Alexander> Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 Alexander> 170 - Telefax 089 / 514 50 666 Alexander> ___ Zope Alexander> maillist - [EMAIL PROTECTED] Alexander> http://lists.zope.org/mailman/listinfo/zope ** No cross Alexander> posts or HTML encoding! ** (Related lists - Alexander> http://lists.zope.org/mailman/listinfo/zope-announce Alexander> http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] mysql & zope
Hi Zopistas! we are looking for a method to do a better integration of mysql 3.23.27 with zope 2.2.2. (we are using the Z MySQL database adapter Z MySQL DA 1.1.3.) We have to store data in a mysql database - we can´t use ZODB because we need the data accessible by other programs via ODBC. We habe implemented several ZClasses like "customer", "product" and "orders". We store their instances (eg. each product, customer and so on) to the mysql-database. Our problem: we can´t use the standard ZOPE management interface to manage the objects, because the methods of this interface store content to the ZODB - and not to the mysql-database. Is there a way to extend the standard ZOPE management interface with additional mysql statements? For example: we select an object in a zope folder, press the ZOPE Delete-Button, then this object is deleted on the mysql-database, not on the ZODB? For each zclass (customer, products, orders) we need these extra methods (Delete, Update, Insert ...), so our thought is that we would prefer to use the ZOPE management interface to do this instead of programming "extra methods" which obviously can't be used within the standard ZOPE management interface. Hope there is somebody out there with an similarly problem solved. best regards Ruediger ~ http://www.herrenausstatter.de - Der Online-Herrenausstatter Kostenlose Serviceline: 0800 -999 66 33 Versandkostenfreie Lieferung - 30 Tage Rückgaberecht ~ Verwaltungsadresse: DePauli.com Aktiengesellschaft Stahlgruberring 3 - 81829 München Telefon: 089 / 530 75 170 - Telefax 089 / 514 50 666 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL
K H Subrahmanyan wrote: > > hi, >I want to add MySQL to my ZOPE. > > Please help me in installing it. > > Please give the links, necessary information. How about actually doing some work for yourself for a change rather than expecting everyone else to do it for you? Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL
hi, I want to add MySQL to my ZOPE. Please help me in installing it. Please give the links, necessary information. thanks bye subrahmayan. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL Connection String
I use the following format: users@frankenstein privileged_user ThePassWord - or in general terms - TableName[@HostNameOfMachineMySQLIsRunningOn] MySQLUserName ThePassWord I guess the "@HostNameOfMachineMySQLIsRunningOn" part is optional, but I needed to put it in there for my setup. The "privileged_user" is one that you've done a MySQL GRANT for. I.e. something like: GRANT SELECT,INSERT,UPDATE ON DatabaseName.TableName TO MySQLUserName IDENTIFIED BY 'ThePassWord'; FYI, I found this info in ALANPOG's HowTo: http://www.zope.org/Members/alanpog/zmysqlda_steps hth, Eric. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Aitor Grajal Crespo Sent: Friday, November 17, 2000 8:37 AM To: [EMAIL PROTECTED] Subject: [Zope] MySQL Connection String I have installed ZMySQLDA 1.1.4, anybody knows the format of the database connection string??? I have put database user passw , and doesn't work Thanks ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL Connection String
On 17/11/00 4:36 pm, "Aitor Grajal Crespo" <[EMAIL PROTECTED]> wrote: > I have installed ZMySQLDA 1.1.4, > anybody knows the format of the database connection string??? > > I have put database user passw , and doesn't work > > Thanks > > database@host user passwd 'host' can be 'localhost' for database servers on the same machine as Zope... hth Tone -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 222 5116 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL Connection String
I have installed ZMySQLDA 1.1.4, anybody knows the format of the database connection string??? I have put database user passw , and doesn't work Thanks
RE: [Zope] MySQL and Zope struggles
What about one sql method: select @noteid:=note_id from artist where update note set notes = where note_id = @noteid -Original Message- From: Richard Moon [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 2:48 AM To: [EMAIL PROTECTED] Subject: [Zope] MySQL and Zope struggles I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL (Why ? - because I've got a kind offer of free hosting if I use MySQL). MySQL offers a limited set of features and is missing, among other things, the ability to use subqueries - so for example in PostgreSQL you can say update note set notes = where note_id = (select note_id from artist where ) and in MySQL you can't. If you were working in a traditional programming environment you could overcome this by splitting the above into two parts - a select to retrieve the value of note_id from the artist table followed by an update of the note table using the returned value of note-id. For example select note-id into note-id-var from artist where artist-id = 23; update note set notes = 'asdasda' where note-id = note-id-var; The problem is that in Zope I believe you can't use a returned value within an SQL Method, so the above code would fail. The only way I can see to do the above is to have two separate SQL Methods, one for the select, returning the note-id-var and another for the update. This is very clumsy. I was wondering if anyone could tell me if there was a better way. Many thanks Richard Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL and Zope struggles
Thanks Monty, I did try the temporary table route - problem is that Zope keeps the connection open so the temporary table stays there. Of course you can explicitly drop the temporary table after you've used it. However if the update fails for any reason the temporary table will still exist so next time in the SQL method fails because its trying to create a temporary table that is already there. I know this shouldn't happen etc but I don't like code that has that kind of potential problem in it - it isn't 'fail-safe'. I decided better to use a permanent table. The SQL method locks it, deletes everything in it then writes the data it needs to store. That way its fail safe and I would expect more efficient than creating and dropping tables. However I hadn't appreciate the REPLACE command. That's a real hidden gem. I'm off to see if I can use it - thanks. Richard At 11:37 17/10/00, you wrote: >You can do it with temporary tables. > >Like this- > >create temporary table foo ( > note_id int, > notes varchar >); >insert into foo select Note.note_id, Note.notes from Note, Artist > where Note.note_id=Artist.note_id and Artist.artist_id=23; >update foo set notes="asdlfna"; >replace into Note select note_id, notes from foo; > >This does assume that the note_id is unique. >You may also need to explicitly drop foo, because it goes away when you >disconnect, but of course Zope holds connections open. > >!!! However -- now that I think of it... you can just do: >replace into Note select note_id, "New Note" from Artist where artist_id=23; > >Of couse, this will change all notes for an artist, so it assumes the >artist_id is unique as well. (Which I would assume it is from your model.) > >If you need more complex things, look into temporary tables, but the MySQL >extension (like replace) do allow you to do fun things. > >Hope this helps, >Monty > >Richard Moon wrote: > > > Nice idea. Trouble is the note table is used to hold notes for many > > different reasons, so it looks like this - > > > > --- > > | Artist| | Recording | | Label | etc. > > --- > > | artist_id | |recording_id| |label_id| > > | note_id | |note_id | |note_id | > > --- > > | || | | > >- > > | > > -- > >| Note | > > -- > >| note_id | > >| notes| > > -- > > > > It looks as if there wasn't anything I was missing - I'm just going to have > > to break the code up into separate SQL Methods. > > > > The example I gave was quite simple compared to some of the updates I have > > to deal with. > > > > Thanks anyway. > > > > At 17:40 16/10/00, you wrote: > > >Or you could renormalize your data to have: > > > > > > - --- > > >| Artist | | Note | > > >|-|---|---| > > >| id | | id| > > > -| artist_id | > > > | note_str | > > >--- > > > > > >you now have a list of notes by artist_id. > > >You typically won't have a screen that doesn't have an Artist context > > >to be adding a note to. (or to remove all notes from). > > >Of course this means more work to migrate :-( > > >And I don't know all possible scenarios for which you would > > >need the structure you gave, but it is another way around this. > > >It probably doesn't solve real complex scenarios either. > > > > > >JAT > > > > > >Dale > > > > Richard Moon > > [EMAIL PROTECTED] > > > > ___ > > Zope maillist - [EMAIL PROTECTED] > > http://lists.zope.org/mailman/listinfo/zope > > ** No cross posts or HTML encoding! ** > > (Related lists - > > http://lists.zope.org/mailman/listinfo/zope-announce > > http://lists.zope.org/mailman/listinfo/zope-dev ) > > >___ >Zope maillist - [EMAIL PROTECTED] >http://lists.zope.org/mailman/listinfo/zope >** No cross posts or HTML encoding! ** >(Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL and Zope struggles
You can do it with temporary tables. Like this- create temporary table foo ( note_id int, notes varchar ); insert into foo select Note.note_id, Note.notes from Note, Artist where Note.note_id=Artist.note_id and Artist.artist_id=23; update foo set notes="asdlfna"; replace into Note select note_id, notes from foo; This does assume that the note_id is unique. You may also need to explicitly drop foo, because it goes away when you disconnect, but of course Zope holds connections open. !!! However -- now that I think of it... you can just do: replace into Note select note_id, "New Note" from Artist where artist_id=23; Of couse, this will change all notes for an artist, so it assumes the artist_id is unique as well. (Which I would assume it is from your model.) If you need more complex things, look into temporary tables, but the MySQL extension (like replace) do allow you to do fun things. Hope this helps, Monty Richard Moon wrote: > Nice idea. Trouble is the note table is used to hold notes for many > different reasons, so it looks like this - > > --- > | Artist| | Recording | | Label | etc. > --- > | artist_id | |recording_id| |label_id| > | note_id | |note_id | |note_id | > --- > | || | | >- > | > -- >| Note | > -- >| note_id | >| notes| > -- > > It looks as if there wasn't anything I was missing - I'm just going to have > to break the code up into separate SQL Methods. > > The example I gave was quite simple compared to some of the updates I have > to deal with. > > Thanks anyway. > > At 17:40 16/10/00, you wrote: > >Or you could renormalize your data to have: > > > > - --- > >| Artist | | Note | > >|-|---|---| > >| id | | id| > > -| artist_id | > > | note_str | > >--- > > > >you now have a list of notes by artist_id. > >You typically won't have a screen that doesn't have an Artist context > >to be adding a note to. (or to remove all notes from). > >Of course this means more work to migrate :-( > >And I don't know all possible scenarios for which you would > >need the structure you gave, but it is another way around this. > >It probably doesn't solve real complex scenarios either. > > > >JAT > > > >Dale > > Richard Moon > [EMAIL PROTECTED] > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL and Zope struggles
Nice idea. Trouble is the note table is used to hold notes for many different reasons, so it looks like this - --- | Artist| | Recording | | Label | etc. --- | artist_id | |recording_id| |label_id| | note_id | |note_id | |note_id | --- | || | | - | -- | Note | -- | note_id | | notes| -- It looks as if there wasn't anything I was missing - I'm just going to have to break the code up into separate SQL Methods. The example I gave was quite simple compared to some of the updates I have to deal with. Thanks anyway. At 17:40 16/10/00, you wrote: >Or you could renormalize your data to have: > > - --- >| Artist | | Note | >|-|---|---| >| id | | id| > -| artist_id | > | note_str | >--- > >you now have a list of notes by artist_id. >You typically won't have a screen that doesn't have an Artist context >to be adding a note to. (or to remove all notes from). >Of course this means more work to migrate :-( >And I don't know all possible scenarios for which you would >need the structure you gave, but it is another way around this. >It probably doesn't solve real complex scenarios either. > >JAT > >Dale Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL and Zope struggles
Or you could renormalize your data to have: - --- | Artist | | Note | |-|---|---| | id | | id| -| artist_id | | note_str | --- you now have a list of notes by artist_id. You typically won't have a screen that doesn't have an Artist context to be adding a note to. (or to remove all notes from). Of course this means more work to migrate :-( And I don't know all possible scenarios for which you would need the structure you gave, but it is another way around this. It probably doesn't solve real complex scenarios either. JAT Dale -Original Message- From: administrator [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 6:11 AM To: zope Cc: administrator Subject: Re: [Zope] MySQL and Zope struggles I don't know if the following link can solve your problem, but maybe it gives you an idea: http://www.zope.org/Members/Roug/new_record_with_subrecords (How-To: Creating a new record with subrecords in MySQL) Arno > I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL > (Why ? - because I've got a kind offer of free hosting if I use MySQL). > > MySQL offers a limited set of features and is missing, among other things, > the ability to use subqueries - so for example in PostgreSQL you can say > > update note set notes = > where note_id = > (select note_id from artist where ) > > and in MySQL you can't. > > If you were working in a traditional programming environment you could > overcome this by splitting the above into two parts - a select to retrieve > the value of note_id from the artist table followed by an update of the > note table using the returned value of note-id. > > For example > > select note-id into note-id-var from artist where artist-id = 23; > update note set notes = 'asdasda' where note-id = note-id-var; > > The problem is that in Zope I believe you can't use a returned value within > an SQL Method, so the above code would fail. The only way I can see to do > the above is to have two separate SQL Methods, one for the select, > returning the note-id-var and another for the update. This is very clumsy. > > I was wondering if anyone could tell me if there was a better way. > > Many thanks > > > Richard > > Richard Moon > [EMAIL PROTECTED] > > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > To: [EMAIL PROTECTED]
Re: [Zope] MySQL and Zope struggles
I don't know if the following link can solve your problem, but maybe it gives you an idea: http://www.zope.org/Members/Roug/new_record_with_subrecords (How-To: Creating a new record with subrecords in MySQL) Arno > I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL > (Why ? - because I've got a kind offer of free hosting if I use MySQL). > > MySQL offers a limited set of features and is missing, among other things, > the ability to use subqueries - so for example in PostgreSQL you can say > > update note set notes = > where note_id = > (select note_id from artist where ) > > and in MySQL you can't. > > If you were working in a traditional programming environment you could > overcome this by splitting the above into two parts - a select to retrieve > the value of note_id from the artist table followed by an update of the > note table using the returned value of note-id. > > For example > > select note-id into note-id-var from artist where artist-id = 23; > update note set notes = 'asdasda' where note-id = note-id-var; > > The problem is that in Zope I believe you can't use a returned value within > an SQL Method, so the above code would fail. The only way I can see to do > the above is to have two separate SQL Methods, one for the select, > returning the note-id-var and another for the update. This is very clumsy. > > I was wondering if anyone could tell me if there was a better way. > > Many thanks > > > Richard > > Richard Moon > [EMAIL PROTECTED] > > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > > > To: [EMAIL PROTECTED]
[Zope] MySQL and Zope struggles
I'm struggling to migrate an application from Zope/PostgreSQL to Zope MySQL (Why ? - because I've got a kind offer of free hosting if I use MySQL). MySQL offers a limited set of features and is missing, among other things, the ability to use subqueries - so for example in PostgreSQL you can say update note set notes = where note_id = (select note_id from artist where ) and in MySQL you can't. If you were working in a traditional programming environment you could overcome this by splitting the above into two parts - a select to retrieve the value of note_id from the artist table followed by an update of the note table using the returned value of note-id. For example select note-id into note-id-var from artist where artist-id = 23; update note set notes = 'asdasda' where note-id = note-id-var; The problem is that in Zope I believe you can't use a returned value within an SQL Method, so the above code would fail. The only way I can see to do the above is to have two separate SQL Methods, one for the select, returning the note-id-var and another for the update. This is very clumsy. I was wondering if anyone could tell me if there was a better way. Many thanks Richard Richard Moon [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope & MySQL on Win98
Hello Zope and MySQL users, I'm trying to access MySQL through Zope. I hope someone can point out my set-up error(s). Environment: Windows98: 4.10.98 MySQL Server: 3.23.21-beta-debug Zope v.: 2.2.0 (binary release, python 1.5.2, win32-x86) Python v.: 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)] ZMySQLDA v.: 1.1.4 (nonbinary) (in: /lib/Products/ZMySQLDA/) MySQL.pyd 'MySQLmodule-1.4: A Python interface to the MySQL database.' (this from MySQL.__doc__) (in: /bin/lib/) MySQL works fine through the mysqlc monitor and Python scripts using odi and odbc. But I keep crashing Zope/Python with even the simplest queries. Here's what I do, followed by the mysqld -log file entries. Start MySQL: C:\mysql\bin\mysqld.exe --console --log Start Zope:C:\Program Files\\start.bat (Which is, out-of-the-box: "C:\Program Files\TotipotentZope\bin\python.exe" "C:\Program Files\TotipotentZope\z2.py" -D %1 %2 %3 %4 %5 %6 %7 %8 %9) Zope says: 2000-08-10T11:44:08 PROBLEM(100) ZServer Computing default hostname -- 2000-08-10T11:44:08 INFO(0) ZServer Medusa (V1.16.4.2) started at Thu Aug 10 13:44:08 2000 Hostname: LAP_WILL Port:8080 (Other than PROBLEM(100), all looks fine.) Start Netscape (Communicator 4.7 -- but same results with IE5) Go to:http://localhost:8080/manage;login Go to:folder with 'Z MySQL Database Connection' Open: Database Connection object> 'The database connection is open.' Go to:'Properties' click 'Change' (without changing anything) Crash:'PYTHON caused an invalid page fault in module MYSQL.PYD at 015f:012d3827.' MySQL log files (tmm is a DB on MySQL): C:\mysql\bin\mysqld.exe, Version: 3.23.21-beta-debug-log, started with: Tcp port: 3306 Unix socket: MySQL Time Id CommandArgument 000810 13:56:23 1 Connectroot@localhost on 1 Init DBtmm 000810 13:56:35 2 Connectroot@localhost on 2 Init DBtmm 1 Quit Many thanks for any suggestions. William BC Crandall Wiesbaden, Germany [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] mySQL - Z SQL - dtml-var
Gijs Reulen writes: > INSERT INTO test1 > ( id, content, phone ) > VALUES ( > , > , > > ) > > According to the doc I should be able to use dtml-var statements in Z SQL > Methods. However, this returns an error: Error, exceptions.KeyError: 12.12 This is indeed a strange variable name (12.12). Do you mean the floating point value 12.12 rather than a variable of this name? In this case, you should use: > I also tried: > INSERT INTO test1 > ( id, content, phone ) > VALUES ( > , > , > > ) > > This also retuns an error: Error, exceptions.ValueError: Invalid > floating-point value for id Obviously, "id" does not contain a floating point value. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] mySQL - Z SQL - dtml-var
Why does this not work inside a Z SQL Method (using MySQL) ?! INSERT INTO test1 ( id, content, phone ) VALUES ( , , ) According to the doc I should be able to use dtml-var statements in Z SQL Methods. However, this returns an error: Error, exceptions.KeyError: 12.12 I also tried: INSERT INTO test1 ( id, content, phone ) VALUES ( , , ) This also retuns an error: Error, exceptions.ValueError: Invalid floating-point value for id But it is no problem inserting data by hand into the database using the very same value as I used in these tests (12.12). What am I doing wrong ? Gijs Reulen ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL LIKE operator
> > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 12, 2000 11:03 AM > > To: [EMAIL PROTECTED] > > Subject: [Zope] MySQL LIKE operator > > > > > > Hello, > > > > I'm writing a search query to a MySQL database. I want to keep > > people from screwing around with my database by running searches like "; > > delete from ... yada yada. So I should use , right? But > > what if I want to use LIKE? > > If I say: WHERE goo LIKE "%%" then > > effectively I am saying: WHERE goo LIKE "%'somestring'%". In other > > words, it will match only the string with the single quotes. I hope > > this makes sense. Has anyone faced a similar problem? > > Thanks for any help > > > > --Aaron Here's a sample of some larger scale SQL with just the thing your looking for in it. SELECT * FROM users user_name LIKE user_firstname LIKE user_lastname LIKE user_age LIKE user_town LIKE user_email LIKE ORDER BY user_name Hope this helps Phill ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] MySQL LIKE operator
You should be able to use something like this (untested): That way you get the SQL quoting without the surrounding quotes. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 12, 2000 11:03 AM > To: [EMAIL PROTECTED] > Subject: [Zope] MySQL LIKE operator > > > Hello, > > I'm writing a search query to a MySQL database. I want to keep > people from screwing around with my database by running searches like "; > delete from ... yada yada. So I should use , right? But > what if I want to use LIKE? > If I say: WHERE goo LIKE "%%" then > effectively I am saying: WHERE goo LIKE "%'somestring'%". In other > words, it will match only the string with the single quotes. I hope > this makes sense. Has anyone faced a similar problem? > Thanks for any help > > --Aaron > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] MySQL LIKE operator
Hello, I'm writing a search query to a MySQL database. I want to keep people from screwing around with my database by running searches like "; delete from ... yada yada. So I should use , right? But what if I want to use LIKE? If I say: WHERE goo LIKE "%%" then effectively I am saying: WHERE goo LIKE "%'somestring'%". In other words, it will match only the string with the single quotes. I hope this makes sense. Has anyone faced a similar problem? Thanks for any help --Aaron ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL transaction support (was: MySQL Select Statements)
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< On 7/4/00, 12:47:07 AM, Andy Dustman <[EMAIL PROTECTED]> wrote regarding Re: [Zope] MySQL transaction support (was: MySQL Select Statements): > Note also: With non-transactional databases, you would expect to get > better performance by having several open connections which are not > shared. In the case of MySQL, each connection has it's own server thread, > and this can exploit CPUs, if available. However, connections should not > be shared on transactional databases, because transactions are tied to a > connection, and not a cursor. Even if there is a mutex to keep multiple > threads from executing queries simultaneously on the same connection, the > transactions are going to be whacky. Oracle is obviously transactional. Does anyone know how it handles connection pooling? I'll look and see it I can figure it out, but I'd love it if someone already knew... Monty ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL Select Statements
On Sat, 1 Jul 2000, Dieter Maurer wrote: > I recently found out that Oracle returns column names > converted into all uppercase. I needed about 2 hours > to analyse this weird behaviour. That's actually not too weird. Solid does the same thing. It is a standard "feature" of SQL-89 that column names are case-insensitive and stored as upper case. You can force it to use mixed-case and spaces by quoting the column names with quotation marks. Of course, you have to do this when you CREATE TABLE. i.e. SELECT "weird but legal" FROM t selects the column named "weird but legal" from table t. MySQL, OTOH, is case-sensitive on column names. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL transaction support (was: MySQL Select Statements)
On Tue, 4 Jul 2000, Hannu Krosing wrote: > AFAIK the transaction support is enabled on table-by-table basis, so > there > is no way to know for sure if transactions are > supported/partially-supported/unsupported for a particular set of > queries True enough. There are several problems here: 1) We must avoid using BEGIN/COMMIT/ROLLBACK on servers < 3.23.15 because it will result in syntax errors. 2) We must raise exceptions whenever the DA attempts to use transacation semantics and the database cannot fulfill this. Silently allowing the transaction manager to believe ROLLBACK has succeeded when it is actually doing nothing is a bad thing. 3) Even though the server may support transactions, the tables may not. Calling ROLLBACK hopefully produces an error, which is a good thing. 4) Calling ROLLBACK in AUTOCOMMIT mode probably does not produce an error. This is bad, but easily avoided by using BEGIN to force a transaction. Does this cause MySQL to produce an error if the tables don't support it? I don't know. Probably not. IMHO, the only good way to avoid these problems is to effectively have two DAs: A transactional one and a non-transactional one, perhaps determined by a Zope property. The application designer will have to choose which DA to use for a given application. Note also: With non-transactional databases, you would expect to get better performance by having several open connections which are not shared. In the case of MySQL, each connection has it's own server thread, and this can exploit CPUs, if available. However, connections should not be shared on transactional databases, because transactions are tied to a connection, and not a cursor. Even if there is a mutex to keep multiple threads from executing queries simultaneously on the same connection, the transactions are going to be whacky. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] MySQL transaction support (was: MySQL Select Statements)
Andy Dustman wrote: > > There are two factors which determine whether or not transactions can be > supported. Actually, there's only one, but it can't be directly tested > for: > > 1) If the server version (easily obtained upon establishing the > connection) is < 3.23.15, transactions are definitely not supported. > > 2) If the database in use employs BDB tables, transactions are definitely > supported. AFAIK the transaction support is enabled on table-by-table basis, so there is no way to know for sure if transactions are supported/partially-supported/unsupported for a particular set of queries > The problem is: Support for the transaction manager is done with a MixIN > class, so the decision on whether or not transactions should be supported > in the DA comes before the connection object is created. But after the connection is established you could probably change the mixin class, at least if it is really a proxy wrapper of some other class. Python is _very_ dynamic language. Hannu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )