-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of paul_s_johnson@urscorp.com Sent: Wednesday, January 10, 2001 9:30 AM To: zope@zope.org Subject: [Zope] MySQLDA and MySQL-python - patch needed?
My Zope-MySQL connection is still not quite working. It appears that the request from Zope is reaching MySQL and it if is an UPDATE or INSERT query it executes properly on the MySQL side. However, SELECT queries and similar are not getting their information back to Zope from MySQL. Is there some patch I am missing here? Anybody know how to fix this?
FYI: I installed from these rpms
ftp://ftp.logicetc.com/pub/Zope/RPMS/MySQL-python-0.2.1-1.i386.rpm ftp://ftp.logicetc.com/pub/Zope/RPMS/Zope-ZMySQLDA-1.2.0-1.i386.rpm
This did not install into my Zope installation directory, so I used a symbolic link in my Zope Products directory that points to the directory of MySQLDA install. Could this be the cause? Perhaps information that should be returned from MySQL is getting lost on the return trip. If so, how would I fix it? Any ideas?
The RPMS install the DA where the Zope RPMS install Products. I actually put my products in the same place (RPMS or not) and use symbolic links for the different instances of Zope I have running, so I know symbolic links will work. If DA product is showing not broken in the Control Panel, then it was installed properly.
On my box only DA is symlinked to a different location. The rest of my products reside in a child directory of the main Zope installation. I am only running one Zope instance. This shouldn't be a problem, right?
Are you getting any error messages? How do you know the information is not getting back to Zope? When you test the queries on the connection management screen, do you get results?
From Zope management database connection Test tab, on valid SELECT queries it tells me that there was no data matching my query. On invalid SELECT queries (ones on nonexistent tables or columns) Zope raises the correct error originating from MySQL, such as "Error Value: (1146, "Table 'somedatabase.sometable' doesn't exist")". The trial queries I am testing through Zope all work from the MySQL command line so I know they do in fact return data. It appears that error messages are making it back to Zope from MySQL but real query results are not.
I did some more searching and see that two other posters on this list have also had this identical problem, but no solutions have been posted (at least that I can find). ONE IDEA: I had already spent some time on installing DA before I found your RPMs. Previous to this I was trying some older, more complicated methods outlined on Zope.org and started installing some of the necessary components for installation. I did clean up before installing from the RPMs, but perhaps I missed something and some residue lingers. I know how to uninstall RPMs, but other than that how do I make sure I have a clean slate before trying to install anew? I think there is quite a number of mod dependencies here. Also I am confused on a basic piece of Zope configuration: my box has its own python and Zope has its own python, why two and are they sharing modules? If you want to add a module for both installs of python do I have to install in both? If I install a python module in my box's python can Zope's python find and use it? I am confused on this basic question. I also did this as (contributed previously to the list) to fix a install but broken DA. Directory, site-packages, now exists in two locations. Is this a problem?
Seems that because of how my Zope was installed had problems... I copied all files from /usr/lib/python1.5/site-packages/ to /usr/local/zope/lib/python/Products/ZmySQLDA and all was sweet.
Day 5 of the insanity continues. -PSJ
I haven't been following this thread, so I apologize in advance for any redundancy. Several weeks ago I had an existing mysql fail as you describe after I upgraded mysqldb in /usr/lib/python. I fixed it by moving ZMySQLDA/MySQLdb-0.1.2/_mysqlmodule.so up one level as described in README.txt. Bill. On Thu, 11 Jan 2001 paul_s_johnson@urscorp.com wrote:
From Zope management database connection Test tab, on valid SELECT queries it tells me that there was no data matching my query. On invalid SELECT queries (ones on nonexistent tables or columns) Zope raises the correct error originating from MySQL, such as "Error Value: (1146, "Table 'somedatabase.sometable' doesn't exist")". The trial queries I am testing through Zope all work from the MySQL command line so I know they do in fact return data. It appears that error messages are making it back to Zope from MySQL but real query results are not.
A binary distribution comes with python built-in so that it will run without the installer having to also go get python. PYTHONPATH is the key to understanding module sharing. Unless you (or the packager) change something, a binary Zope uses only the modules in the built-in python (or, at least, has the built-in lib/python first in PYTHONPATH). In the same vein, the two pythons don't share modules unless you change somemthing, e.g. PYTHONPATH (or maybe both their PYTHONPATHs end in /usr/local/python). Just to double check what's going on in your Zope, use this code to create an external method and visit it with your browser. import sys def sysPath(self): buff = '' for dir in sys.path: buff = '%s\n%s' % (buff, dir) return buff Bill. On Thu, 11 Jan 2001 paul_s_johnson@urscorp.com wrote:
dependencies here. Also I am confused on a basic piece of Zope configuration: my box has its own python and Zope has its own python, why two and are they sharing modules? If you want to add a module for both installs of python do I have to install in both? If I install a python module in my box's python can Zope's python find and use it? I am confused on this basic question.
participants (2)
-
Bill Welch -
paul_s_johnsonļ¼ urscorp.com