[Zope] Problem w/ ZMySQLDA

Jonathan dev101 at magma.ca
Mon Jul 16 09:12:07 EDT 2007


----- Original Message ----- 
From: <tonylabarbara at aol.com>
To: <zope at zope.org>
Sent: Monday, July 16, 2007 8:55 AM
Subject: [Zope] Problem w/ ZMySQLDA


>
> ----- Original Message ----- 
> From: <tonylabarbara at aol.com>
> To: <zope at zope.org>
> Sent: Saturday, July 14, 2007 5:43 PM
> Subject: [Zope] Problem w/ ZMySQLDA
>
>
>> > Hi;
>> > ? I just built out a new server and transfered my databases. I use Zope 
>> > to
>> > server my web sites and ZMySQLDA to interface between the two. 
>> > Everything
>> > seems
>> > to be fine. I can see the databases, the tables, the columns in the
>> > tables, the
>> > permissions are correct, etc. I hook up ZMySQLDA and that seems to be
>> > fine. It
>> > connects to the database. However, when I go to look at the pages from
>> > served
>> > the database, the browser hangs. Any ideas how to troubleshoot this?
>
>> You should have a MySQL_database_connection object in a folder somewhere 
>> (in
>> the ZMI).? The "Status" for this object should say "The database 
>> connection
>> is open".? There is a "Test" tab for this object in which you can enter 
>> an
>> sql query. If this query works ok, then the next step is to test your Z 
>> SQL
>> Method(s).
>
> Thanks. That clarified a lot. The MySQL query comes back fine. I'm 
> troubleshooting a complex shop I had a programmer who worked for me 
> build...so it's not my code...and it's complex ;) I went into the 
> shopkeeper's side and was able to successfully query the database. I was, 
> for example, able to display the "cotton" products for editing. However, 
> when I do essentially_the_same_thing TTW with the following code snippet, 
> it hangs!
>
> <tal:block metal:define-macro="content"
> ?????????? define="dummy python:request.set('category', 5)">
>
> ? <tal:block 
> metal:use-macro="here/Store/Main_frame_content/macros/content" />
>
> </tal:block>
>
> Furthermore, mytop shows the user is hanging:
> ???? 30 mysqluser?????? localhost mrtableclo?????? 473? Sleep
>
> What should I do next to troubleshoot this?

I would test the code outside of tal. Just execute (test) the routine by 
itself to see what it is returning. A couple of things to check:  (i) is the 
routine receiving the correct input parameters, (ii) is the routine 
returning what you are expecting.


Jonathan 



More information about the Zope mailing list