[Zope] Re: MySQLDA and MySQL-python - patch needed?

2001-01-15 Thread paul_s_johnson


Brian,

I finally got it working. Here's what I did:

I uninstalled all of ZMySQLDA and MySQL-python (formerly MySQLdb - this
name change didn't help any although in the big picture it probably needed
to be done) deleting any trace of it. I then followed all the directions
starting from here:

http://www.zope.org/Members/adustman/MySQLdb - This is the MySQL-python
module.

I used the version of ZMySQLDA that Andy Dustman points to here (there's
more than one floating about and I may have latched onto a
MySQL-python-incompatible one at some point):

http://www.zope.org/Members/adustman/ZMySQLDA - installing this is just of
matter of untarring in the correct Zope directory.

To install MySQL-python I followed the directions that Andy lays out in his
README.txt.  It required that I had to install the rpms mysql-devel and
python-devel which I tracked down at http://rpmfind.net for my flavor of
Linux (RedHat) and MySQL (3.22.32). Once these were installed I was able to
build it exactly as Andy stipulates.

Being a Linux/Zope newbie this seemed daunting but it was more painless
that I originally anticipated.

With these installed I was then getting the error "_mysql module not found"
(or something like that). The python of Zope was not finding the modules I
just built from my main system python. I changed my Zope start-up script
appending the PYTHONPATH variable to include the path where the module
installed to. I added these lines:

PYTHONPATH=$PYTHONPATH:/usr/lib/python1.5/site-packages
export PYTHONPATH

BINGO everything then worked.

Hope that helps.

My hunch is that there is some version incompatibilities going on between
MySQL-python and ZMySQLDA that prevent MySQL query results from returning
to Zope.

BTW, thanks to everyone that responded to my emails for help. Even though
none of them was the exact answer I needed they all supplied some missing
critical piece of the puzzle. Opensource is a cool thing, but none of it
would amount to much without lists like this to help folks out.  Keep it
coming.

-PSJ

Hello All,

I have the exact same problem.  I am running slack 7.1 and I have
installed all of the goodies (i.e. zope, python, mysql, etc.) from
the source code.  After finally figuring out that my /etc/ld.so.conf
was not seeing the mysqlclient libraries i was able to compile
MySQLdb-python modules and ZMySQLDA says that it is installed
properly.  But I have the same issues with the SELECT queries
returning no data (There was no data matching this test_sql query. )
That is straight from Zope.  When I INSERT data to my columns in the
table it works fine though.  I have verified this from the console.
Please advise if there are any suggestions.  Thanks.

Brian L Gautreau


___
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] MySQLDA and MySQL-python - patch needed?

2001-01-11 Thread paul_s_johnson


Paul S. Johnson
URS Corporation
700 Third Street South
Minneapolis, MN 55415-1199
612-373-6389


   
   
   
   
"Ron Bickers"To: [EMAIL PROTECTED], 
[EMAIL PROTECTED]
rbickers@logcc:   
   
icetc.com   Subject: RE: [Zope] MySQLDA and 
MySQL-python - patch needed? 
Sent by:   
   
zope-admin@zo  
   
pe.org 
   
   
   
   
   
01/10/01   
   
05:16 PM   
   
   
   
   
   



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, January 10, 2001 9:30 AM
 To: [EMAIL PROTECTED]
 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 

RE: [Zope] MySQLDA and MySQL-python - patch needed?

2001-01-11 Thread paul_s_johnson



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, January 10, 2001 9:30 AM
 To: [EMAIL PROTECTED]
 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




___
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] Help getting zope to do frames!

2001-01-11 Thread paul_s_johnson






To properly reference your frames by their absolute urls, instead of this:

frame name="A" src="dtml-var top"
frame name="B" src="dtml-var main"

Try this:

frame name="A" src="dtml-var "top.absolute_url()""
frame name="B" src="dtml-var "main.absolute_url()""


-PSJ




___
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] MySQLDA and MySQL-python - patch needed?

2001-01-10 Thread paul_s_johnson

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?

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] MySQL connection woes

2001-01-09 Thread paul_s_johnson

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 connection woes

2001-01-09 Thread paul_s_johnson

   
   
   
   
"Randall F.  To: [EMAIL PROTECTED]  
   
Kern"cc:   
   
randy@spoke.Subject: RE: [Zope] MySQL connection woes 
   
net   
   
   
   
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

2001-01-09 Thread paul_s_johnson




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 )




[Zope] Large XML files

2000-12-05 Thread paul_s_johnson

I am testing the possibilities of delivering the content of  XML Documents
through the Zope environment.  Unfortunately, some of the proposed file are
rather large (up to 760KB) and just uploading them and viewing them on our
current Zope server is prohibitively slow.  Our server, running Z2 is a
blazing P133 running NT 4.0 with 32 MB of RAM (I get the bottom feeders).
Is the bottleneck the hardware; is there something I can do software-wise
to improve performance; or is development not yet advanced enough to handle
this scenario efficiently? Any opinions on this?

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] Help with Nested ZSQL methods

2000-11-29 Thread paul_s_johnson

I thought I saw this answer to this one time on http://www.zope.org once,
but for the life of me I cannot seem to find it.

I have two ZSQL methods, both tested and work.

ZSQL method 1
===
method id= sql_get_schedules
SELECT * FROM Schedules WHERE JobID = dtml-var JobID ORDER BY SchedSeq

ZSQL method 2
===
method id= sql_get_items
SELECT * FROM Items WHERE SchedID = dtml-var SchedID ORDER BY ItemNo

These two tables are linked by the common field "SchedID"


Here's the operative part of the dtml method that calls these methods:
==
dtml-in sql_get_schedules
 TABLE BORDER="3"
 TRTHItem No./THTHDescription/THTHMn/DOT
No./THTHUnits/TH/TR
 dtml-in sql_get_items
  TR
   TDdtml-var ItemNo/TD
   TDdtml-var Description/TD
   TDdtml-var MnDOTNo/TD
   TDdtml-var UnitDescription/TD
 /TR
 dtml-in
 TABLE
/dtml-in
==

I get the error:

Error Type: Bad Request
Error Value: ['SchedID']

I suspect there is some type of namespace-related problem going on here
where the var SchedID is not getting passed to the internal ZSQL method.

P. Johnson

P.S.: I must Lotus Notes ( http://www.iarchitect.com/lotus1.htm ) at my
place of employment.  Any errantly inserted HTML or other weird garbage not
intentional.


___
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] ZODBC configuration problems

2000-11-28 Thread paul_s_johnson

Alas, I am but a Zope newbie and need help getting my database connections
to work.  I have previously configured the ODBC Data Source Administrator
to link Access mdbs with the PERL DBI module and it has worked with no
problems.  I have installed the ZODBC product and in the Zope database
connection window all the names of the ODBC data sources that have been
configured show up in the listbox. Upon attempting to add any of the data
sources I receive the error "Invalid connection string" except for one of
the databases that Zope does accept.  Upon testing this database connection
with a test query I get the following error:

Error Type: sql.error
Error Value: ('42000', -1907, "[Microsoft][ODBC Microsoft Access 97 Driver]
Record(s) can't be read; no read permission on 'ProjectSheets'.")

The permissions on this database are such that any anonymous user can
access its data so the error message appears to be inaccurate.  I double
checked the db permissions to make sure this is the case.

I am running Zope on NT 4.0 and using Access 97.  The logged-in user on the
webserver is not a member of any Access-related workgroups so this
eliminates most security-related access issues (I think) and none of the
databases are passworded.

There's some flakiness going on here.  Any recommendations for isolating
and resolving these problems?

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 )