Re: [Zope] ZMySQLDA Question

2007-09-27 Thread tonylabarbara

 Thanks!


 


 

-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Thu, 27 Sep 2007 3:43 pm
Subject: Re: [Zope] ZMySQLDA Question









?

--On 27. September 2007 15:37:33 -0400 [EMAIL PROTECTED] wrote:?
?

> Hi;?

> I want to do something like this in my Page Template:?

> mysql> select * from products order by name, newRow;?

>?

> Now, I know I can do this:?

>?

> tal:define="items python:sequence.sort(items, (('name', 'cmp', 'asc'),))"?

>?

> but that only orders by name, not by name *and* newRow. Any ideas??

>?
?

YES! You read the fine documentation:?
?

<http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx>?
?

-aj?



 



Email and AIM finally together. You've gotta check out free AOL Mail! - 
http://mail.aol.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] ZMySQLDA Question

2007-09-27 Thread Andreas Jung



--On 27. September 2007 15:37:33 -0400 [EMAIL PROTECTED] wrote:


Hi;
I want to do something like this in my Page Template:
mysql> select * from products order by name, newRow;

Now, I know I can do this:

tal:define="items python:sequence.sort(items, (('name', 'cmp', 'asc'),))"

but that only orders by name, not by name *and* newRow. Any ideas?



YES! You read the fine documentation:



-aj

pgpRwMn7NR13K.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] ZMySQLDA Question

2007-09-27 Thread tonylabarbara
Hi;
I want to do something like this in my Page Template:
mysql> select * from products order by name, newRow;

Now, I know I can do this:

tal:define="items python:sequence.sort(items, (('name', 'cmp', 'asc'),))"

but that only orders by name, not by name *and* newRow. Any ideas?
TIA,
Tony


Email and AIM finally together. You've gotta check out free AOL Mail! - 
http://mail.aol.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] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
setenv
Thanks!
Tony 
 
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 5 Mar 2007 8:38 AM
Subject: Re: [Zope] ZMySQLDA Problem


 
--On 5. März 2007 07:35:19 -0500 [EMAIL PROTECTED] wrote: 
 
> Thank you for giving me that command, unfortunately, "export" is not 
> found on my system (?). 
># export LD_LIBRARY_PATH=/usr/local/lib/mysql/ 
> export: Command not found. 
># find / -name export 
># 
> 
 
you might read about the unix basics...setting an environment variable depends 
on the type of your shell. I have no idea which shell your using. 
Reading the man page of your shell and Goggle should give you an answer *wink*. 
 
-aj 

AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.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] ZMySQLDA Problem

2007-03-05 Thread Andreas Jung



--On 5. März 2007 07:35:19 -0500 [EMAIL PROTECTED] wrote:


Thank you for giving me that command, unfortunately, "export" is not
found on my system (?).
# export LD_LIBRARY_PATH=/usr/local/lib/mysql/
export: Command not found.
# find / -name export
#



you might read about the unix basics...setting an environment variable 
depends on the type of your shell. I have no idea which shell your using.
Reading the man page of your shell and Goggle should give you an answer 
*wink*.


-aj

pgpPDbn3Zsenf.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] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
Thank you for giving me that command, unfortunately, "export" is not found on 
my system (?). 
 
# export LD_LIBRARY_PATH=/usr/local/lib/mysql/
export: Command not found.
# find / -name export
#
 
Is there another command? FreeBSD 6.2
TIA,
Tony 
 
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 5 Mar 2007 8:29 AM
Subject: Re: [Zope] ZMySQLDA Problem


 
--On 5. März 2007 07:26:10 -0500 [EMAIL PROTECTED] wrote: 
 
># find / -name libmysqlclient_r.so.15 
> /usr/local/lib/mysql/libmysqlclient_r.so.15 
># find / -name bdist.freebsd-6.2-RELEASE-i386 
> /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386 
># ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/ 
># 
> 
> It would appear that indeed libmysqlclient_r.so.15 is in fact to be found 
> in the /usr/local/lib/mysql dir. So that would appear to not be the 
> issue. Next, you state that it might not be found in its environment, and 
> tell me I should try adding it "using the LD_LIBRARY_PATH environment 
> variable". Okay, but could you be more specific? How exactly do I do 
> that? Or, where is a resource to learn how to do it? TIA, 
> Tony 
> 
> 
 
export LD_LIBRARY_PATH=/path/to/libdir1:/path/to/libdir2: 
 
-aj 

AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.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] ZMySQLDA Problem

2007-03-05 Thread Andreas Jung



--On 5. März 2007 07:26:10 -0500 [EMAIL PROTECTED] wrote:


# find / -name libmysqlclient_r.so.15
/usr/local/lib/mysql/libmysqlclient_r.so.15
# find / -name bdist.freebsd-6.2-RELEASE-i386
/usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386
# ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/
#

It would appear that indeed libmysqlclient_r.so.15 is in fact to be found
in the /usr/local/lib/mysql dir. So that would appear to not be the
issue. Next, you state that it might not be found in its environment, and
tell me I should try adding it "using the LD_LIBRARY_PATH environment
variable". Okay, but could you be more specific? How exactly do I do
that? Or, where is a resource to learn how to do it? TIA,
Tony




export LD_LIBRARY_PATH=/path/to/libdir1:/path/to/libdir2:

-aj

pgpYYaWHIb0EJ.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] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
# find / -name libmysqlclient_r.so.15
/usr/local/lib/mysql/libmysqlclient_r.so.15
# find / -name bdist.freebsd-6.2-RELEASE-i386
/usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386
# ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/
#
 
It would appear that indeed libmysqlclient_r.so.15 is in fact to be found in 
the /usr/local/lib/mysql dir. So that would appear to not be the issue. Next, 
you state that it might not be found in its environment, and tell me I should 
try adding it "using the LD_LIBRARY_PATH environment variable". Okay, but could 
you be more specific? How exactly do I do that? Or, where is a resource to 
learn how to do it?
TIA,
Tony
 
 
-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Mon, 5 Mar 2007 8:19 AM
Subject: Re: [Zope] ZMySQLDA Problem


 
--On 5. März 2007 07:14:41 -0500 [EMAIL PROTECTED] wrote: 
> __bootstrap__ ImportError: Shared object "libmysqlclient_r.so.15" not 
> found, required by "_mysql.so" Traceback (most recent call last): 
 
This is also self-speaking. The mysql client libaries are either not installed 
or can't be found. Check if the file is installed properly. If yes, try to 
extend the library search path of the dynamic linker 
using the LD_LIBRARY_PATH environment variable. 
 
-aj 

AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.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] ZMySQLDA Problem

2007-03-05 Thread Andreas Jung



--On 5. März 2007 07:14:41 -0500 [EMAIL PROTECTED] wrote:

__bootstrap__ ImportError: Shared object "libmysqlclient_r.so.15" not
found, required by "_mysql.so" Traceback (most recent call last):


This is also self-speaking. The mysql client libaries are either not 
installed or can't be found. Check if the file is installed properly. If 
yes, try to extend the library search path of the dynamic linker

using the LD_LIBRARY_PATH environment variable.

-aj

pgpclFmWPZ6Z3.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] ZMySQLDA Problem

2007-03-05 Thread tonylabarbara
Traceback (most recent call last):
File "/usr/local/zope/278/lib/python/OFS/Application.py", line 673, in 
import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/zope/instance1/Products/ZMySQLDA/__init__.py", line 91, in ?
import DA
File "/usr/local/zope/instance1/Products/ZMySQLDA/DA.py", line 91, in ?
from db import DB
File "/usr/local/zope/instance1/Products/ZMySQLDA/db.py", line 89, in ?
import _mysql
File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 7, in ?
File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 6, in 
__bootstrap__
ImportError: Shared object "libmysqlclient_r.so.15" not found, required by 
"_mysql.so"
Traceback (most recent call last):
File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ?
run()
File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run
start_zope(opts.configroot)
File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in 
start_zope
starter.startZope()
File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in 
startZope
Zope.startup()
File "/usr/local/zope/278/lib/python/Zope/__init__.py", line 47, in startup
_startup()
File "/usr/local/zope/278/lib/python/Zope/App/startup.py", line 45, in startup
OFS.Application.import_products()
File "/usr/local/zope/278/lib/python/OFS/Application.py", line 650, in 
import_products
import_product(product_dir, product_name, raise_exc=debug_mode)
File "/usr/local/zope/278/lib/python/OFS/Application.py", line 673, in 
import_product
product=__import__(pname, global_dict, global_dict, silly)
File "/usr/local/zope/instance1/Products/ZMySQLDA/__init__.py", line 91, in ?
import DA
File "/usr/local/zope/instance1/Products/ZMySQLDA/DA.py", line 91, in ?
from db import DB
File "/usr/local/zope/instance1/Products/ZMySQLDA/db.py", line 89, in ?
import _mysql
File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 7, in ?
File "build/bdist.freebsd-6.2-RELEASE-i386/egg/_mysql.py", line 6, in 
__bootstrap__
ImportError: Shared object "libmysqlclient_r.so.15" not found, required by 
"_mysql.so"
 
# find / -name libmysqlclient_r.so.15
/usr/local/lib/mysql/libmysqlclient_r.so.15
# find / -name bdist.freebsd-6.2-RELEASE-i386
/usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386
# ls /usr/src/MySQL-python-1.2.2/build/bdist.freebsd-6.2-RELEASE-i386/
#
 
So, evidently, there isn't even a dir named "egg" under the given dir in which 
to look for said file! What do?
TIA,
Tony

AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.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] ZMySQLDA

2005-09-08 Thread Andy Dustman
On 9/1/05, michael <[EMAIL PROTECTED]> wrote:
> Hi, I am trying to set this up, following install instructions from
> zope.org/Members/Mike/ZMySQLDA 
> make -f Makefile command works fine, but 'make' afterwards produces
> the following error:

That page, which no longer exists, was extraordinarily out of date. I
deduce this from the fact that your compiler output is for
MySQLmodule.c. Look here for modern versions:

http://sourceforge.net/projects/mysql-python

-- 
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] ZMySQLDA

2005-09-01 Thread Dieter Maurer
michael wrote at 2005-9-1 14:44 +1000:
> ...
>Hi, I am trying to set this up, following install instructions from 
>zope.org/Members/Mike/ZMySQLDA 
>make -f Makefile command works fine, but 'make' afterwards produces 
>the following error:
> ...
>[EMAIL PROTECTED] src]# make
>gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
>-I/usr/local/include/python2.4 -I/usr/local/include/python2.4 @DEFS@   
>-I/usr/local/mysql/include -I/usr/include/mysql -c ././MySQLmodule.c -o 
>./MySQLmodule.o

Your makefile is not yet prepared to get executed:

  The "@@" indicate placeholders that are interpolated
  by a generation process.

  Apparently, either a "@DEFS@" remained or the generation process
  was omitted altogether.

You could try to remove the "@DEFS@ manually from the makefile
and then try again. If it works, fine. Otherwise,
you need to find out why "@DEFS@" remained.

-- 
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] ZMySQLDA

2005-08-31 Thread michael
Hi, I am trying to set this up, following install instructions from 
zope.org/Members/Mike/ZMySQLDA 
make -f Makefile command works fine, but 'make' afterwards produces 
the following error:


can some one please help me!  I have followed all instructions around, 
and none of them cover this problem (problem is pro'lly me!)


mike.

output follows:

 snip ---
[EMAIL PROTECTED] src]# make
gcc -pthread -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
-I/usr/local/include/python2.4 -I/usr/local/include/python2.4 @DEFS@   
-I/usr/local/mysql/include -I/usr/include/mysql -c ././MySQLmodule.c -o 
./MySQLmodule.o

gcc: @DEFS@: No such file or directory
././MySQLmodule.c:199: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âclear_channelâ:
././MySQLmodule.c:204: warning: suggest parentheses around assignment 
used as truth value

././MySQLmodule.c: At top level:
././MySQLmodule.c:217: warning: function declaration isnât a prototype
././MySQLmodule.c:229: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âpythonify_rowâ:
././MySQLmodule.c:238: warning: assignment from incompatible pointer type
././MySQLmodule.c: At top level:
././MySQLmodule.c:339: warning: function declaration isnât a prototype
././MySQLmodule.c:373: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âpythonify_res_fieldsâ:
././MySQLmodule.c:384: error: invalid lvalue in unary â&â
././MySQLmodule.c: At top level:
././MySQLmodule.c:483: warning: function declaration isnât a prototype
././MySQLmodule.c:502: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âMySQL_connectâ:
././MySQLmodule.c:515: warning: implicit declaration of function 
âmysql_connectâ

././MySQLmodule.c: At top level:
././MySQLmodule.c:530: warning: function declaration isnât a prototype
././MySQLmodule.c:562: warning: function declaration isnât a prototype
././MySQLmodule.c:580: warning: function declaration isnât a prototype
././MySQLmodule.c:607: warning: function declaration isnât a prototype
././MySQLmodule.c:634: warning: function declaration isnât a prototype
././MySQLmodule.c:662: warning: function declaration isnât a prototype
././MySQLmodule.c:688: warning: function declaration isnât a prototype
././MySQLmodule.c:722: warning: function declaration isnât a prototype
././MySQLmodule.c:734: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_createâ:
././MySQLmodule.c:743: warning: implicit declaration of function 
âmysql_create_dbâ

././MySQLmodule.c: At top level:
././MySQLmodule.c:753: warning: function declaration isnât a prototype
././MySQLmodule.c:767: warning: function declaration isnât a prototype
././MySQLmodule.c:779: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_statâ:
././MySQLmodule.c:787: warning: assignment discards qualifiers from 
pointer target type

././MySQLmodule.c: At top level:
././MySQLmodule.c:796: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_clientinfoâ:
././MySQLmodule.c:799: warning: unused variable âinfoâ
././MySQLmodule.c: At top level:
././MySQLmodule.c:815: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_hostinfoâ:
././MySQLmodule.c:823: warning: assignment discards qualifiers from 
pointer target type

././MySQLmodule.c: At top level:
././MySQLmodule.c:832: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_serverinfoâ:
././MySQLmodule.c:840: warning: assignment discards qualifiers from 
pointer target type

././MySQLmodule.c: At top level:
././MySQLmodule.c:849: warning: function declaration isnât a prototype
././MySQLmodule.c:866: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_dropâ:
././MySQLmodule.c:875: warning: implicit declaration of function 
âmysql_drop_dbâ

././MySQLmodule.c: At top level:
././MySQLmodule.c:885: warning: function declaration isnât a prototype
././MySQLmodule.c:902: warning: function declaration isnât a prototype
././MySQLmodule.c: In function âDBH_shutdownâ:
././MySQLmodule.c:909: error: too few arguments to function âmysql_shutdownâ
././MySQLmodule.c: At top level:
././MySQLmodule.c:920: warning: function declaration isnât a prototype
././MySQLmodule.c:973: warning: function declaration isnât a prototype
././MySQLmodule.c:986: warning: function declaration isnât a prototype
././MySQLmodule.c:994: warning: function declaration isnât a prototype
././MySQLmodule.c:1032: warning: function declaration isnât a prototype
././MySQLmodule.c:1040: warning: function declaration isnât a prototype
././MySQLmodule.c:1070: warning: function declaration isnât a prototype
././MySQLmodule.c:1085: warning: function declaration isnât a prototype
././MySQLmodule.c:1102: warning: function declaration isnât a prototype
././MySQLmodule.c: In functio

Re: [Zope] ZMYSQLDA 2.0.9 lock problem

2005-06-21 Thread Dieter Maurer
Dennis Allison wrote at 2005-6-20 11:31 -0700:
> ...
>* Module Shared.DC.ZRDB.TM, line 59, in tpc_finish
>* Module Products.ZMySQLDA.db, line 376, in _finish
>
>error: release unlocked lock

When I remember right, I have seen such problem reports in
the mailing list.

You have checked the archives?


-- 
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] ZMYSQLDA 2.0.9 lock problem

2005-06-20 Thread Dennis Allison
IE, Zope 2.7.6, Python 2.4.1, MYSQLDA 2.0.9

One of our developers is reporting a curious problem, which I have not
been able to track down.  It appears to be threading related, somewhere 
in the ZBMYSQLDB adaptor.

The database connection string is bare of transaction indicators.  The 
database is local.  All tables are MyISAM which is non-transactioal.

Unfortunately the user does not remember the exact sequence of events
which generate the problem so I am unable to duplicate.  What we do know
is that the problem occurs at the beginning of a development session begun
with a cold boot of the client machine and a fresh browser and it occurs
once and only onece during the development session.  The developer
normally has two active Zope threads going--one working with the
application and one working with the ZMI.  He moves between them using the
Open/View tab and other buttons.  He reports that the first time he moves
focus from the ZMI to the application, he gets the following error:

---
Time  2005/06/20 07:12:03.478 GMT-7
User Name (User Id)  (X)
Request URL http://xxx..com/logged_in
Exception Type error
Exception Value release unlocked lock

Traceback (innermost last):

* Module ZPublisher.Publish, line 107, in publish
* Module Zope.App.startup, line 222, in commit
* Module ZODB.Transaction, line 260, in commit
* Module ZODB.Transaction, line 377, in _finish_many
* Module Shared.DC.ZRDB.TM, line 59, in tpc_finish
* Module Products.ZMySQLDA.db, line 376, in _finish

error: release unlocked lock


The lock being released is a transactional lock.  None of our locks should 
be transactional locks, given our setup.  I traced through the __init__()
method for DB and did not see how transactional locking could be 
specified so the lock relaease code could run--I must be missing 
something.  No thread in our system uses transactional locking as the 
tables do no support transactions.

The logged_in method references the MySQL database in several places; a 
couple of them are compound queries where multiple queries are joined 
by "" values.  Many of our queries use this 
in combination with the "use " SQL query.   

The system is using ZODB filestorage (Data.fs) with ZEO and is pretty 
much out of the box.

Has anyone else encountrered a similar problem.  Any suggestions as to how 
to find this bug?  

___
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] ZMySQLDA problems after upgrade

2001-01-26 Thread Ron Bickers

Yeah... I just realized that's what broke my 'select LAST_INSERT_ID() as
newid' query where a LIMIT clause causes a MySQL error.  I had max_rows set
to 0 and all of a sudden I was getting Zope errors.

This worked in earlier DAs.

Thanks for the upcoming fix, Andy.
___

Ron Bickers
Logic Etc, Inc.
[EMAIL PROTECTED]

> -Original Message-
> From: Randall F. Kern [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 1:22 PM
> To: Ron Bickers; Andy Dustman
> Cc: [EMAIL PROTECTED]
> Subject: RE: [Zope] ZMySQLDA problems after upgrade
>
>
> You will get 0 rows if you use max_rows=0.
>
> -Randy


___
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] ZMySQLDA problems after upgrade

2001-01-26 Thread Andy Dustman

On Fri, 26 Jan 2001, Randall F. Kern wrote:

> You will get 0 rows if you use max_rows=0.

OK, I agree that this is a legit bug, and I am in the process of working
up a new patch. I'll send it off-list when it's ready.

-- 
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] ZMySQLDA problems after upgrade

2001-01-26 Thread Randall F. Kern

You will get 0 rows if you use max_rows=0.

-Randy

-Original Message-
From: Ron Bickers [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 10:05 AM
To: Ron Bickers; Andy Dustman; Randall F. Kern
Cc: [EMAIL PROTECTED]
Subject: RE: [Zope] ZMySQLDA problems after upgrade


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ron
> Bickers
> Sent: Friday, January 26, 2001 11:28 AM
> To: Andy Dustman; Randall F. Kern
> Cc: [EMAIL PROTECTED]
> Subject: RE: [Zope] ZMySQLDA problems after upgrade

> How about excluding the automatic LIMIT clause if max_rows is set to
0?
> Would that confuse people?

Oh!  It already does that.  So if you want to make your own LIMIT
clause,
just set max_rows to 0.  Correct me, Andy, if this is a bad thing.
___

Ron Bickers
Logic Etc, Inc.
[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] ZMySQLDA problems after upgrade

2001-01-26 Thread Andy Dustman

On Fri, 26 Jan 2001, Ron Bickers wrote:

> > How about excluding the automatic LIMIT clause if max_rows is set to 0?
> > Would that confuse people?
> 
> Oh!  It already does that.  So if you want to make your own LIMIT clause,
> just set max_rows to 0.  Correct me, Andy, if this is a bad thing.

That sounds very much like a good thing. I will have to add that to the
tip I have (really, re-write it). I actually forgot that it did
that. Randy, does setting max_rows to zero fix things for you?

-- 
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] ZMySQLDA problems after upgrade

2001-01-26 Thread Ron Bickers

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ron
> Bickers
> Sent: Friday, January 26, 2001 11:28 AM
> To: Andy Dustman; Randall F. Kern
> Cc: [EMAIL PROTECTED]
> Subject: RE: [Zope] ZMySQLDA problems after upgrade

> How about excluding the automatic LIMIT clause if max_rows is set to 0?
> Would that confuse people?

Oh!  It already does that.  So if you want to make your own LIMIT clause,
just set max_rows to 0.  Correct me, Andy, if this is a bad thing.
___

Ron Bickers
Logic Etc, Inc.
[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] ZMySQLDA problems after upgrade

2001-01-26 Thread Ron Bickers

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Andy Dustman
> Sent: Friday, January 26, 2001 12:42 AM
> To: Randall F. Kern
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Zope] ZMySQLDA problems after upgrade

> be returned to it by the query method, mysql_store_result is the way to
> go. And since Zope passes max_rows as a separate parameter, it makes sense
> (to me) to make use of it.

How about excluding the automatic LIMIT clause if max_rows is set to 0?
Would that confuse people?

___

Ron Bickers
Logic Etc, Inc.
[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] ZMySQLDA problems after upgrade

2001-01-25 Thread Andy Dustman

On Thu, 25 Jan 2001, Randall F. Kern wrote:

> 1) All field values appear as strings in python

Use ZMySQLDA-2.0.4. There was some confusion on my part as to whether or
not the DA should return string values to Zope. All values are now
converted to the correct Python types, or DateTime objects.

> 2) select ...  limit a[,b]
> This doesn't work anymore, and that just appears to be a bug in
> ZMySQLDA.

It's a feature.

> I have a patch if anyone is interested.  (Problem is that
> DB.query() adds a limit clause to the query, based on the max_rows
> argument.  This makes windowing (using two arguments with limit)
> impossible.)

Here's the problem as I see it. First is that LIMIT is MySQL-specific,
AFAIK, so using it in Z SQL Methods is going to be non-portable between
databases, which you may or may not care about.

Second is that the whole reason LIMIT exists is because with MySQL you
have two options: Store the entire result set on the client side
(mysql_store_result), or keep it on the server side (mysql_use_result) and
retrieve it row-by-row. But since Zope requires that the entire result set
be returned to it by the query method, mysql_store_result is the way to
go. And since Zope passes max_rows as a separate parameter, it makes sense
(to me) to make use of it.

Third relates to SQL syntax, which is very large, and case-insensitive.
While it's not too hard to determine that the statement is a SELECT, it is
very hard to determine with certainty that it has a LIMIT clause.

Solution: This could be solved by extending the DA interface to include an
additional parameter: skip_rows=0 Then ZMySQLDA could make use of this in
adding the LIMIT clause. The problem is, I think it will break a lot of
DAs. However, I think they can be very easily fixed. Besides which, I
think a lot of DAs are going to be broken by Zope 2.3 for the simple
reason that all the DTML code in the base DA product is moving from
Shared.DC.ZRDB into a dtml subdirectory. Perhaps the DAs are already
fixed, I really haven't messed with Zope 2.3 very much yet.

I am cc:ing Brian Lloyd (because he seems like the best bet at this
point) to get Digital Creations' attention (obviously they read the list,
but this message could easily be overlooked). You can also send me your
patch, if you think you have a better way to solve this.

-- 
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] ZMySQLDA problems after upgrade

2001-01-25 Thread Randall F. Kern

I recently moved my product from zope 2.2.5 with ZMySQLDA 1.1.4 and
MySQLDB 0.1.2 to a Zope 2.3.0b3 with new mysql code (MySQL-python-0.3.0,
and ZMySQLDA 2.0.1).  With these changes, I've found a couple problems,
and was wondering if others where familiar with any of these problems,
if some might be configuration issues.

1) All field values appear as strings in python
This is the issue I hope is my own configuration mistake.  Using the old
product, field values where auto-converted to compatible python types;
so int fields would be int's in python, not strings.  This has broken
many things in my product, and although I can patch all my queries to
call int()/float()/etc on the results, there is code in MySQL-python to
auto-convert field values.

2) select ...  limit a[,b]
This doesn't work anymore, and that just appears to be a bug in
ZMySQLDA.  I have a patch if anyone is interested.  (Problem is that
DB.query() adds a limit clause to the query, based on the max_rows
argument.  This makes windowing (using two arguments with limit)
impossible.)

Thanks,
-Randy

___
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] ZMySQLDA and Win32 Zope crash

2001-01-17 Thread Chris Withers

peter bengtson wrote:
> 
> William Crandall had a similar question with more details but with the same
> result as I. No answer to this one:
> http://zope.nipltd.com/public/lists/zope-archive.nsf/242bb7cc2b2c343d802568a
> b003585d4/f5a855d999e73c978025693600507b4e?OpenDocument

http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/F5A855D999E73C97

...for the wrapping impaired ;-)

The short links appear down at the bottom of the page, so you can post them in
mail messages without wrapping problems.

...and yes we are working on a Zope version of these archives ;-)

cheers,

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] ZMySQLDA and Win32 Zope crash

2001-01-17 Thread peter bengtson

Phil and rest of the Zommunity


I followed the instructions on http://www.zope.org/Members/philh/mysql which
has helped me successfully twice (out of two before) on Windows NT and
Windows 2000.
This installation was seemless like others, and the product doesn't look
broken from the Control_Panel/Products view.
The only thing I've been able to do (not too bad) is to add a Z MySQL
Database Connection with the proper syntax there "database root ".
That works fine.

Whenever I try to use the connection in any way, it crashes Zope!
"An application error has occurred and an application error log is being
generated.
python.exe"
... and from the console Zope (in debug mode) looks to be still running, but
from the management interface I can see that it's not (nothing happens!).

William Crandall had a similar question with more details but with the same
result as I. No answer to this one:
http://zope.nipltd.com/public/lists/zope-archive.nsf/242bb7cc2b2c343d802568a
b003585d4/f5a855d999e73c978025693600507b4e?OpenDocument


I tried it on 2.2.2, failed tried to upgrade to 2.2.5 failed as well.
MySQL: 3.22.34-shareware-debug (no anonymous user set up)
Windows NT(4)
Python 1.5.2 in Program Files but I have that other python.exe in the /bin
ZMySQLDA 1.1.3
I used the MySQL.pyd you provided from your How-To
I also used the libmySQL.dll you provided from your How-To


What can be the reason for this? Is it strange Zope/ZMySQLDA behaviour or is
it my MySQL?

Thanks alot!, Peter



___
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] ZMySQLDA returns truncated/corrupted data?

2001-01-15 Thread Andy Dustman

On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote:

> I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
> ZMySQLDA v2.0.1.

Are you really running MySQL 3.22.23? This is a rather old version.
 
> The install appears to be successfull, the Products appear in the Control
> Panel, I can add, and open a database connection.
> 
> However, when I issue the following query:
> 
> SHOW TABLES;
> 
> I receive the following set:
> 
> Tables in la_eksempel
> 
> a
> 
> (la_eksempel the name of the database, naturally)
> 
> There is no table named 'a', however there is a table named "artikkel". If
> I try to browse the database, I get a tree with 5 first-level nodes, all
> named with the first letter of a table in my database.

That's very odd, because it works for me.

> If I try "SELECT * FROM ARTIKKEL;", I get 
> 
> Error Type: TypeError
> Error Value: len() of unsized object

I don't know if this is the problem, but ZMySQLDA-2.0.1 requires
MySQLdb-0.3.0 (aka MySQL-python). These should both work with
MySQL-3.22.23, though I would recommend an upgrade to at least 3.22.32 (or
3.23.30).

-- 
andy dustman  |  programmer  |  comstar.net is part of the Globix network
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 )




[Zope] ZMySQLDA returns truncated/corrupted data?

2001-01-15 Thread aasmund


I am running Zope from the CVS (from January 14th), MySQL 3.22.23 and
ZMySQLDA v2.0.1.

The install appears to be successfull, the Products appear in the Control
Panel, I can add, and open a database connection.

However, when I issue the following query:

SHOW TABLES;

I receive the following set:

Tables in la_eksempel

a

(la_eksempel the name of the database, naturally)

There is no table named 'a', however there is a table named "artikkel". If
I try to browse the database, I get a tree with 5 first-level nodes, all
named with the first letter of a table in my database.

If I try "SELECT * FROM ARTIKKEL;", I get 

Error Type: TypeError
Error Value: len() of unsized object

With the following traceback:


Traceback (innermost last):
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /home/ahj/polar/zope/Zope2/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: RoleManager)
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: manage_test)
  File /home/ahj/polar/zope/Zope2/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: manage_test)
  File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Connection.py,
line 204, in manage_test
(Object: RoleManager)
  File
/home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: )
  File /home/ahj/polar/zope/Zope2/lib/python/DocumentTemplate/DT_In.py,
line 605, in renderwb
(Object: db)
  File /home/ahj/polar/zope/Zope2/lib/python/Shared/DC/ZRDB/Results.py,
line 174, in __getitem__
TypeError: (see above)



Has anybody else experienced 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] ZMySQLDA, Problems Connecting

2001-01-14 Thread Steve McMahon

Greetings Zopers,

I'm attempting to make connections between Zope and MySQL using 
MySQL-python 0.3.0 and ZMySQLDA 2.01.

The Python/MySQLdb side is working. I can use "connect(db='test')" or 
"connect(db='test', user='guest', passwd='token')" -- where guest and token 
are a MySQL username and password -- to build a connection object and go on 
to do queries.

However, when I attempt to add a Z MySQL Database Connection to a folder, I 
get "Invalid connection string" -- no matter what the connection string I 
offer. (e.g., "test" or "test guest token" or "test@localhost guest token" 
or any number of permutations of these.

Anybody run into this problem? Any suggestions on avenues to pursue?

Thanks, Steve McMahon


___
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] ZMySQLDA and aggregate functions on Win

2001-01-12 Thread Dave Woolston

This is curious to me - I tried this on my Linux platform from mysql and it
doesn't work.
Perhaps I misunderstand what you are trying to do:

SELECT COUNT(*) FROM mytable - returns a number - so I really don't expect
it to work.

I have a table - shop and a column in that table - article:

mysql> select count(*) from show group by article;
ERROR 1064: You have an error in your SQL syntax near 'show group by
article' at line 1

Sorry if I misunderstand what you are trying to do -

=
Dave Woolston   [EMAIL PROTECTED]
Digital Creations  www.digicool.com
(716) 262-4715


> I have a problem with ZMySQLDA and aggregate functions in combination with
> grouping on Windows.
> When I say:
>   SELECT COUNT(*) FROM mytable GROUP BY myfield;
> I get an KeyError 'Unhandeld'.
>
>SELECT COUNT(*) FROM mytable;
> works fine, so does
>   SELECT myfield FROM mytable GROUP BY myfield;
> but not the combination of both.
> Also on a linux machine the error doesn't occur. Of course I tested the
> queries from the mysql command line.
>
> Any help?
>
> Markus Kemmerling





___
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] ZMySQLDA and aggregate functions on Win

2001-01-11 Thread Markus Kemmerling

I have a problem with ZMySQLDA and aggregate functions in combination with 
grouping on Windows.
When I say:
SELECT COUNT(*) FROM mytable GROUP BY myfield;
I get an KeyError 'Unhandeld'.

SELECT COUNT(*) FROM mytable;
works fine, so does
   SELECT myfield FROM mytable GROUP BY myfield;
but not the combination of both.
Also on a linux machine the error doesn't occur. Of course I tested the 
queries from the mysql command line.

Any help?

Markus Kemmerling


___
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] ZMySQLDA traceback

2000-12-05 Thread Curtis Maloney

On Wednesday 06 December 2000 08:47, Rodrigo Leme de Mello wrote:
> Hi All,
>
> I am trying to install ZMySQLDA and as a result of my installation,  i am
> getting the following traceback
>
> ZMySQLDA Import Traceback
> Traceback (innermost last):
>   File "/home/zope/224/lib/python/OFS/Application.py", line 397, in
> import_products
> product=__import__(pname, global_dict, global_dict, silly)
>   File "/home/zope/224/lib/python/Products/ZMySQLDA/__init__.py", line 106,
> in ?
> import sys, os, Globals, DA
>   File "/home/zope/224/lib/python/Products/ZMySQLDA/DA.py", line 108, in ?
> from db import DB
>   File "/home/zope/224/lib/python/Products/ZMySQLDA/db.py", line 106, in ?
> import _mysql, regex, sys
> ImportError: No module named _mysql
>
> Any help will be welcome
>

You have not installed the Python MySQL module.  Depending on which MySQL 
Zope product you downloaded, this either came with it, or you will have to 
download it seperately.

Last time I installed a fresh Zope/Python combo, I used ZMySQLDA 1.2.0, which 
comes with the MySQLdb Python module sources.  I found it to be a fairly 
simple and painless install.

Previous versions did require you to download the MySQLdb module seperately.  
Both are on www.zope.org.

> Regards
>
> Rodrigo
>
>

Have a better one,
Curtis Maloney

___
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] ZMySQLDA traceback

2000-12-05 Thread Rodrigo Leme de Mello

Hi All,

I am trying to install ZMySQLDA and as a result of my installation,  i am
getting the following traceback

ZMySQLDA Import Traceback
Traceback (innermost last):
  File "/home/zope/224/lib/python/OFS/Application.py", line 397, in
import_products
product=__import__(pname, global_dict, global_dict, silly)
  File "/home/zope/224/lib/python/Products/ZMySQLDA/__init__.py", line 106,
in ?
import sys, os, Globals, DA
  File "/home/zope/224/lib/python/Products/ZMySQLDA/DA.py", line 108, in ?
from db import DB
  File "/home/zope/224/lib/python/Products/ZMySQLDA/db.py", line 106, in ?
import _mysql, regex, sys
ImportError: No module named _mysql

Any help will be welcome

Regards

Rodrigo


___
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] ZMySQLDA installation problem (fwd)

2000-12-01 Thread Chris Gray

Eric Walstad replied to me off-list with the solution to my problem so
I've included it below and I'll copy the zope list since your question
makes me think the solution should be made public.

Cheers,
Chris

On Fri, 01 Dec 2000 06:48:26 - Roberto Fernandez wrote:

I read you post about ZMySQLDA installation and I'm having the same
exact problem, even with Python 2.0.

Have you found a solution yet? If so, could you contact me at
[EMAIL PROTECTED]

Thanks,
Roberto Fernandez



-- Forwarded message --
Date: Sat, 04 Nov 2000 11:22:26 -0800
From: Eric Walstad <[EMAIL PROTECTED]>
To: Chris Gray <[EMAIL PROTECTED]>
Subject: RE: [Zope] ZMySQLDA installation problem

Hi Chris,

I ran into similar errors.  Here's the response from Jo Meder that helped me
get MySQLDA compiled:  Hope it helps!  PS, check out the NIP Ltd Mail list
archives.  They've got a really nice search engine that can help you close
in on answers to your questions:
http://zope.nipltd.com/public/lists/zope-archive.nsf/$$Search?OpenForm
Eric.


> I have tried everything that I can think of (& a lot of what some of you
> could think of) to get MySQLdb to compile and install.  I have had no
luck.
[...]
> 
> # make
>
gcc -fpic -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CO
> NFIG_H  -I/usr/local/mysql/include -I/usr/include/mysql -c ./MySQLmodule.c
> ./MySQLmodule.c: In function `pythonify_row':
> ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
> ./MySQLmodule.c: In function `pythonify_res_fields':
> ./MySQLmodule.c:384: invalid lvalue in unary `&'
> ./MySQLmodule.c: In function `STH_fetchdict':
> ./MySQLmodule.c:1125: invalid lvalue in unary `&'
> ./MySQLmodule.c:1147: invalid lvalue in unary `&'
> make: *** [MySQLmodule.o] Error 1
> 

I suppose line 1125 of mySQLmodule.c is something like:

tf = & (mysql_fetch_field_direct(self->res,j));

If this is the case, try applying the following patch to your
MySQLmodule.c (this is strictly "works for me"):

--cut here-
235c235
< unsigned int *lengths;
---
> unsigned long *lengths;
384c384
< tf = &(mysql_fetch_field_direct(res, i));
---
> tf = (mysql_fetch_field_direct(res, i));
1125c1125
<   tf = &(mysql_fetch_field_direct(self->res,j));
---
>   tf = (mysql_fetch_field_direct(self->res,j));
1147c1147
<   tf = &(mysql_fetch_field_direct(self->res,j));
---
>   tf = (mysql_fetch_field_direct(self->res,j));
-cut here---


HTH.

Jo.


// -----Original Message-
// From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Chris
// Gray
// Sent: Saturday, November 04, 2000 10:43 AM
// To: [EMAIL PROTECTED]
// Subject: [Zope] ZMySQLDA installation problem
//
//
// I'm trying to install ZMySQLDA on Solaris 5.6.  Everything seems to be
// going fine until make tries to compile the module.  Then I get the
// following error messages:
//
// gcc -I/usr/local/mysql/include -I/usr/include/mysql -g -O2
// -I/usr/local/include/python1.5 -I/usr/local/include/python1.5
// -DHAVE_CONFIG_H -c ./MySQLmodule.c
// ./MySQLmodule.c: In function `pythonify_row':
// ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
// ./MySQLmodule.c: In function `pythonify_res_fields':
// ./MySQLmodule.c:384: invalid lvalue in unary `&'
// ./MySQLmodule.c: In function `STH_fetchdict':
// ./MySQLmodule.c:1125: invalid lvalue in unary `&'
// ./MySQLmodule.c:1147: invalid lvalue in unary `&'
// *** Error code 1
// make: Fatal error: Command failed for target `MySQLmodule.o'
//
// Anyone know what's going wrong here?
//
// adTHANKSvance
// 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 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] ZMySQLDA installation problem

2000-11-04 Thread Chris Gray

I'm trying to install ZMySQLDA on Solaris 5.6.  Everything seems to be
going fine until make tries to compile the module.  Then I get the
following error messages:

gcc -I/usr/local/mysql/include -I/usr/include/mysql -g -O2
-I/usr/local/include/python1.5 -I/usr/local/include/python1.5
-DHAVE_CONFIG_H -c ./MySQLmodule.c
./MySQLmodule.c: In function `pythonify_row':
./MySQLmodule.c:238: warning: assignment from incompatible pointer type
./MySQLmodule.c: In function `pythonify_res_fields':
./MySQLmodule.c:384: invalid lvalue in unary `&'
./MySQLmodule.c: In function `STH_fetchdict':
./MySQLmodule.c:1125: invalid lvalue in unary `&'
./MySQLmodule.c:1147: invalid lvalue in unary `&'
*** Error code 1
make: Fatal error: Command failed for target `MySQLmodule.o'

Anyone know what's going wrong here?

adTHANKSvance
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] ZMySQLDA troubles

2000-11-04 Thread Shelley Strik


This is my problem that I have been having.  I am trying to install the
database adapter from MYSQL to Zope.  I downloaded the ZMySQLDA from the
zope webpage.  I then downloaded the Mysqldb from the zope web page.  I
installed both.  It didn't work.  After much trials and tribulations I
found I didn't have the mysql librarys installed.  I do now.  I have work
through a lot of errors and have found myself stuck at this one
place.  The error message that I am getting when I try to start Zope is 

2000-11-04T16:18:14 ERROR(200) Zope Couldn't import Products.ZMySQLDA
Traceback (innermost last):
  File /usr/src/packages/SOURCES/opt/zope/lib/python/OFS/Application.py,
line 39
7, in import_products
(Object: string)
  File
/usr/src/packages/SOURCES/opt/zope/lib/python/Products/ZMySQLDA/__init__.
py, line 106, in ?
  File
/usr/src/packages/SOURCES/opt/zope/lib/python/Products/ZMySQLDA/DA.py, li
ne 108, in ?
  File /usr/share/zope/lib/python/Products/ZMySQLDA/db.py, line 106, in ?
ImportError: /usr/src/packages/SOURCES/opt/zope/lib/python/_mysqlmodule.so: unde
fined symbol: PyObject_Init

I have tryed everything that I can think of and was hoping someone else
might have had the same problem.  If anyone can help me out it would be
appreciated.  

I am running MySQL 3.22.32, Redhat Linux 5.2, Python 2.0 and Zope the
latest version of Zope.  

Any suggest will be appreciated.

Shelley Strik


___
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] ZMySqlDA Binary version

2000-10-11 Thread Agus Setiawan

Hi all, 

Does anyone have a binary version of ZMySqlDA product?
Because I'm running it on my Win 2000 Professional,
and with the non-binary version, it give me message
like this:

2000-10-11T12:26:25 ERROR(200) Zope Couldn't import
Products.ZMySQLDA
Traceback (innermost last):
  File D:\WEBSITE\lib\python\OFS\Application.py, line
397, in import_products
(Object: string)
  File
D:\WebSite\lib\python\Products\ZMySQLDA\__init__.py,
line 106, in ?
  File D:\WebSite\lib\python\Products\ZMySQLDA\DA.py,
line 108, in ?
  File D:\WebSite\lib\python\Products\ZMySQLDA\db.py,
line 106, in ?
ImportError: No module named _mysql

and if anyone have the product, could you please help
me by sending it through my e-mail?

Thanks very much

__
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

___
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] ZMysqlDA error, and a workaround

2000-10-09 Thread Jon Franz

doh, I was the one running the odd version - 1.1.3 as opposed to the newer
1.2 - I guess I never updated this when I updated the full zope install.
The new version looks like it would of been much easier to fix, if it had 
the problem in the first place!

-Original Message-
From: Jon Franz 
Sent: Monday, October 09, 2000 7:07 PM
To: '[EMAIL PROTECTED]'; Jon Franz
Cc: [EMAIL PROTECTED]
Subject: RE: [Zope] ZMysqlDA error, and a workaround


Wow, that looks very diffrent from my ZMySQLDA, what version are you
running?
I just got mine to work, I had to mod the def section in the db.py and some
of the code in the MySQLmodule.c file - I want to make it available for
download
and whatnot, but I need to look through the setup script (since it generated
the 
.c file, I think, or at least  moded it) and make sure what I did it
integrated
into the source at that stage...

-Original Message-
From: Steve Spicklemire [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 7:00 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Zope] ZMysqlDA error, and a workaround



I'm guessing it's in db.py in ZMySQLDA, I had to do the same
thing with DECMIAL as shown here, I didn't post that since I'm
not sure most folks would want this behavior but you should 
be able to do the same with MEDIUMINT:

class DB:

defs={
FIELD_TYPE.CHAR: "i", FIELD_TYPE.DATE: "d",
FIELD_TYPE.DATETIME: "d", FIELD_TYPE.DECIMAL: "n",
FIELD_TYPE.DOUBLE: "n", FIELD_TYPE.FLOAT: "n", FIELD_TYPE.INT24:
"i",
FIELD_TYPE.LONG: "i", FIELD_TYPE.LONGLONG: "l",
FIELD_TYPE.SHORT: "i", FIELD_TYPE.TIMESTAMP: "d",
FIELD_TYPE.TINY: "i", FIELD_TYPE.YEAR: "i",
}

conv={
FIELD_TYPE.TINY: int,
FIELD_TYPE.SHORT: int,
FIELD_TYPE.LONG: int,
FIELD_TYPE.FLOAT: float,
FIELD_TYPE.DOUBLE: float,
FIELD_TYPE.LONGLONG: long,
FIELD_TYPE.INT24: int,
FIELD_TYPE.DECIMAL: float,
FIELD_TYPE.YEAR: int
}


-steve

>>>>> "Jon" == Jon Franz <[EMAIL PROTECTED]> writes:

Jon> This is additional info for the error mentioned in my last
Jon> email.  If I alter the column definitions to use 'int' as
Jon> opposed to 'mediumint', then everything works fine!  So, its
Jon> the 'mediumint' type that isnt mapping properly...  where
Jon> would i fix this?

Jon> ___ Zope maillist
Jon> - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope
Jon> ** No cross posts or HTML encoding!  ** (Related lists -
Jon> http://lists.zope.org/mailman/listinfo/zope-announce
Jon> 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] ZMysqlDA error, and a workaround

2000-10-09 Thread Jon Franz

Wow, that looks very diffrent from my ZMySQLDA, what version are you
running?
I just got mine to work, I had to mod the def section in the db.py and some
of the code in the MySQLmodule.c file - I want to make it available for
download
and whatnot, but I need to look through the setup script (since it generated
the 
.c file, I think, or at least  moded it) and make sure what I did it
integrated
into the source at that stage...

-Original Message-
From: Steve Spicklemire [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 7:00 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Zope] ZMysqlDA error, and a workaround



I'm guessing it's in db.py in ZMySQLDA, I had to do the same
thing with DECMIAL as shown here, I didn't post that since I'm
not sure most folks would want this behavior but you should 
be able to do the same with MEDIUMINT:

class DB:

defs={
FIELD_TYPE.CHAR: "i", FIELD_TYPE.DATE: "d",
FIELD_TYPE.DATETIME: "d", FIELD_TYPE.DECIMAL: "n",
FIELD_TYPE.DOUBLE: "n", FIELD_TYPE.FLOAT: "n", FIELD_TYPE.INT24:
"i",
FIELD_TYPE.LONG: "i", FIELD_TYPE.LONGLONG: "l",
FIELD_TYPE.SHORT: "i", FIELD_TYPE.TIMESTAMP: "d",
FIELD_TYPE.TINY: "i", FIELD_TYPE.YEAR: "i",
}

conv={
FIELD_TYPE.TINY: int,
FIELD_TYPE.SHORT: int,
FIELD_TYPE.LONG: int,
FIELD_TYPE.FLOAT: float,
FIELD_TYPE.DOUBLE: float,
FIELD_TYPE.LONGLONG: long,
FIELD_TYPE.INT24: int,
FIELD_TYPE.DECIMAL: float,
FIELD_TYPE.YEAR: int
}


-steve

>>>>> "Jon" == Jon Franz <[EMAIL PROTECTED]> writes:

Jon> This is additional info for the error mentioned in my last
Jon> email.  If I alter the column definitions to use 'int' as
Jon> opposed to 'mediumint', then everything works fine!  So, its
Jon> the 'mediumint' type that isnt mapping properly...  where
Jon> would i fix this?

Jon> ___ Zope maillist
Jon> - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope
Jon> ** No cross posts or HTML encoding!  ** (Related lists -
Jon> http://lists.zope.org/mailman/listinfo/zope-announce
Jon> 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] ZMysqlDA error, and a workaround

2000-10-09 Thread Steve Spicklemire


I'm guessing it's in db.py in ZMySQLDA, I had to do the same
thing with DECMIAL as shown here, I didn't post that since I'm
not sure most folks would want this behavior but you should 
be able to do the same with MEDIUMINT:

class DB:

defs={
FIELD_TYPE.CHAR: "i", FIELD_TYPE.DATE: "d",
FIELD_TYPE.DATETIME: "d", FIELD_TYPE.DECIMAL: "n",
FIELD_TYPE.DOUBLE: "n", FIELD_TYPE.FLOAT: "n", FIELD_TYPE.INT24: "i",
FIELD_TYPE.LONG: "i", FIELD_TYPE.LONGLONG: "l",
FIELD_TYPE.SHORT: "i", FIELD_TYPE.TIMESTAMP: "d",
FIELD_TYPE.TINY: "i", FIELD_TYPE.YEAR: "i",
}

conv={
FIELD_TYPE.TINY: int,
FIELD_TYPE.SHORT: int,
FIELD_TYPE.LONG: int,
FIELD_TYPE.FLOAT: float,
FIELD_TYPE.DOUBLE: float,
FIELD_TYPE.LONGLONG: long,
FIELD_TYPE.INT24: int,
FIELD_TYPE.DECIMAL: float,
FIELD_TYPE.YEAR: int
}


-steve

> "Jon" == Jon Franz <[EMAIL PROTECTED]> writes:

Jon> This is additional info for the error mentioned in my last
Jon> email.  If I alter the column definitions to use 'int' as
Jon> opposed to 'mediumint', then everything works fine!  So, its
Jon> the 'mediumint' type that isnt mapping properly...  where
Jon> would i fix this?

Jon> ___ Zope maillist
Jon> - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope
Jon> ** No cross posts or HTML encoding!  ** (Related lists -
Jon> http://lists.zope.org/mailman/listinfo/zope-announce
Jon> 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] ZMysqlDA error, and a workaround

2000-10-09 Thread Jon Franz

This is additional info for the error mentioned in my last email.
If I alter the column definitions to use 'int' as opposed to 'mediumint',
then everything works fine!  So, its the 'mediumint' type that isnt mapping
properly...
where would 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 )




Re: [Zope] ZMySQLDA instal Import Error problem

2000-09-30 Thread Thomas Weiner

Richard Moon schrieb:
> 
> Installing MySQLDA-0.1.2 and running
> 
> python build.py
> 
> I get the error
> 
> Import Error: ./_mysqlmodule.so: undefined symbol: uncompress
> 
> Any clues ? I've just installed the latest (3.23.25) MySQL rpms on Linux

MySQL 3.23.25 needs the Zlib libraries. Append in your Setup file the
option -lz to the line '_mysql _mysqlmodule.c .. '

hth,
Thomas

___
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] ZMySQLDA instal Import Error problem

2000-09-29 Thread Richard Moon

Installing MySQLDA-0.1.2 and running

python build.py

I get the error

Import Error: ./_mysqlmodule.so: undefined symbol: uncompress

Any clues ? I've just installed the latest (3.23.25) MySQL rpms on Linux 
6.1, including the client and development libraries, this seems to have put 
stuff in usr/lib and usr/lib/mysql so I made sure that these paths were in 
/etc/ld.so.conf and re-ran /sbin/ldconfig.

Here's the full output - thanks in advance.


rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python sedscript
rm -f *.so *.sl so_locations
VERSION=`python -c "import sys; print sys.version[:3]"`; \
installdir=`python -c "import sys; print sys.prefix"`; \
exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \
make -f ./Makefile.pre.in VPATH=. srcdir=. \
 VERSION=$VERSION \
 installdir=$installdir \
 exec_installdir=$exec_installdir \
 Makefile
make[1]: Entering directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
sed -n \
  -e '1s/.*/1i\\/p' \
  -e '2s%.*%# Generated automatically from Makefile.pre.in by sedscript.%p' \
  -e '/^VERSION=/s/^VERSION=[]*\(.*\)/s%@VERSION[@]%\1%/p' \
  -e '/^CC=/s/^CC=[  ]*\(.*\)/s%@CC[@]%\1%/p' \
  -e '/^CCC=/s/^CCC=[]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \
  -e '/^LINKCC=/s/^LINKCC=[  ]*\(.*\)/s%@LINKCC[@]%\1%/p' \
  -e '/^OPT=/s/^OPT=[]*\(.*\)/s%@OPT[@]%\1%/p' \
  -e '/^LDFLAGS=/s/^LDFLAGS=[]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \
  -e '/^LDLAST=/s/^LDLAST=[  ]*\(.*\)/s%@LDLAST[@]%\1%/p' \
  -e '/^DEFS=/s/^DEFS=[  ]*\(.*\)/s%@DEFS[@]%\1%/p' \
  -e '/^LIBS=/s/^LIBS=[  ]*\(.*\)/s%@LIBS[@]%\1%/p' \
  -e '/^LIBM=/s/^LIBM=[  ]*\(.*\)/s%@LIBM[@]%\1%/p' \
  -e '/^LIBC=/s/^LIBC=[  ]*\(.*\)/s%@LIBC[@]%\1%/p' \
  -e '/^RANLIB=/s/^RANLIB=[  ]*\(.*\)/s%@RANLIB[@]%\1%/p' \
  -e '/^MACHDEP=/s/^MACHDEP=[]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
  -e '/^SO=/s/^SO=[  ]*\(.*\)/s%@SO[@]%\1%/p' \
  -e '/^LDSHARED=/s/^LDSHARED=[  ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
  -e '/^CCSHARED=/s/^CCSHARED=[  ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
  -e '/^SGI_ABI=/s/^SGI_ABI=[]*\(.*\)/s%@SGI_ABI[@]%\1%/p' \
  -e 
'/^LINKFORSHARED=/s/^LINKFORSHARED=[]*\(.*\)/s%@LINKFORSHARED[@]%\1%
/p' \
  -e '/^prefix=/s/^prefix=\(.*\)/s%^prefix=.*%prefix=\1%/p' \
  -e 
'/^exec_prefix=/s/^exec_prefix=\(.*\)/s%^exec_prefix=.*%exec_prefix=\1%/p' \

  /usr/lib/python1.5/config/Makefile >sedscript
echo "/^#@SET_CCC@/d" >>sedscript
echo "/^installdir=/s%=.*%= /usr%" >>sedscript
echo "/^exec_installdir=/s%=.*%=/usr%" >>sedscript
echo "/^srcdir=/s%=.*%= .%" >>sedscript
echo "/^VPATH=/s%=.*%=  .%" >>sedscript
echo "/^LINKPATH=/s%=.*%=   %" >>sedscript
echo "/^BASELIB=/s%=.*%=%" >>sedscript
echo "/^BASESETUP=/s%=.*%=  %" >>sedscript
sed -f sedscript ./Makefile.pre.in >Makefile.pre
/usr/lib/python1.5/config/makesetup \
  -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup 
-n  /usr
/lib/python1.5/config/Setup.thread /usr/lib/python1.5/config/Setup.local 
/usr/li
b/python1.5/config/Setup
make -f Makefile do-it-again
make[2]: Entering directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
/usr/lib/python1.5/config/makesetup \
  -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup 
-n  /usr
/lib/python1.5/config/Setup.thread /usr/lib/python1.5/config/Setup.local 
/usr/li
b/python1.5/config/Setup
make[2]: Leaving directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
make[1]: Leaving directory `/opt/Zope-2.2.1/lib/python/Products/MySQLdb-0.1.2'
gcc -fPIC  -I/usr/include/mysql -g -O2 -I/usr/include/python1.5 
-I/usr/include/p
ython1.5 -DHAVE_CONFIG_H -c ./_mysqlmodule.c
./_mysqlmodule.c: In function `_mysql_ConnectionObject_num_fields':
./_mysqlmodule.c:909: warning: passing arg 1 of `mysql_num_fields' from 
incompat
ible pointer type
gcc -shared  _mysqlmodule.o  -L/usr/lib/mysql -lmysqlclient -o _mysqlmodule.so
Traceback (innermost last):
   File "build.py", line 14, in ?
 import MySQLdb
   File "MySQLdb.py", line 19, in ?
 from _mysql import *
ImportError: ./_mysqlmodule.so: undefined symbol: uncompress

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] ZMySQLDA question

2000-09-27 Thread Chris Herrnberger

Greetings,

I aplogize in advance for this nubie question. In a previouse version of
Zope I was able to install the mysqlDBA using the binary version of
Zope. Currently running Zope 2.2.2 on SuSE 6.4 as a learning exercise.
Installing ZMySQLDA on this system work smoothly untill I restart zope.
The following errors are posted.

chris@boogert:~/zope222 > --
2000-09-27T18:03:47 ERROR(200) Zope Couldn't import Products.ZMySQLDA
Traceback (innermost last):
  File /home/chris/zope222/lib/python/OFS/Application.py, line 397, in
import_p
roducts
(Object: string)
  File lib/python/Products/ZMySQLDA/__init__.py, line 106, in ?
  File /home/chris/zope222/lib/python/Products/ZMySQLDA/DA.py, line 108,
in ?
  File /home/chris/zope222/lib/python/Products/ZMySQLDA/db.py, line 106,
in ?

yet the module clearly exists;

chris@boogert:/usr/lib/python1.5/site-packages > ls -la
total 352
drwxr-xr-x   4 root root 4096 Sep 27 14:03 .
drwxrwxr-x   8 root root12288 Sep  3 15:36 ..
-rw-r--r--   1 root root10828 Sep 27 14:03 MySQLdb.py
-rw-r--r--   1 root root16504 Sep 27 14:03 MySQLdb.pyc
-rw-r--r--   1 root root15557 Sep 27 14:03 MySQLdb.pyo
drwxr-xr-x   2 root root 4096 Sep  2 12:48 PIL
-r-xr-xr-x   1 root root99200 Sep 27 14:03 _mysqlmodule.so
-rwxr-xr-x   1 root root   175479 Mar 11  2000 gdmodule.so
drwxr-xr-x   2 root root 4096 Sep 14 13:33 gvib

The interbase connection btw works smoothly. Once I get this up then
I'll tackle the postgresql db connector.

Any advise would be appreciated. Again the Zope install is a binary from
zope.org

Best and thanks

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] WG: [Zope] ZMYSQLDA

2000-09-18 Thread Dicken, Peer

Hi,

I´ve got it running. ZMYSQLDA could not find the libraries from mysqldb.
Yes, you´re right, it was a FAQ.
BTW: Is there any product that acts as acl_users which allows to collect
more information from my users, like company name, adress ... ?

 
 
MfG / best regards, 
 
Peer Dicken
 
IMD GmbH 
Softwareentwicklung & Unternehmensberatung
Edisonstr. 1
59199 Bönen
 
Tel.: +49 23 83 - 9191-0
Fax.: +49 23 83 - 919191

___
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] ZMYSQLDA

2000-09-18 Thread Dicken, Peer

Hi,

I installed ZmySQLDA and that mysqldb extension. A test with python "import
_mysql" works, but in the control panel the ZMYSQLDA is broken:

ZMySQLDA Import Traceback
Traceback (innermost last):
  File "/usr/local/zope/lib/python/OFS/Application.py", line 396, in
import_products
product=__import__(pname, global_dict, global_dict, silly)
  File "/usr/local/zope/lib/python/Products/ZMySQLDA/__init__.py", line 91,
in ?
import DA
  File "/usr/local/zope/lib/python/Products/ZMySQLDA/DA.py", line 91, in ?
from db import DB
  File "/usr/local/zope/lib/python/Products/ZMySQLDA/db.py", line 89, in ?
import _mysql
ImportError: No module named _mysql

What´s that? How can I solve this?

 
 
MfG / best regards, 
 
Peer Dicken
 
IMD GmbH 
Softwareentwicklung & Unternehmensberatung
Edisonstr. 1
59199 Bönen
 
Tel.: +49 23 83 - 9191-0
Fax.: +49 23 83 - 919191

___
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] ZMySQLDA on Win32

2000-08-14 Thread William BC Crandall

[Re-sending w/o attachments -- too big for mail servers.]

William BC Crandall wrote:
> 
> Chasing down MySQL question, I get here:
> 
> (Besides having a strong urge to return to Linux ;)
> 
> I now have three MySQL.pyd modules (attached for your
> inspection -- labeled 01,02,03). The oldest file (01) 'works',
> in that it imports into PythonWin (once the name is changed
> back to MySQL.pyd), and read its __doc__ files, etc.
> The other two break on import:
> 
> ImportError: DLL load failed: One of the library files
> needed to run this application cannot be found."
> 
> The one remaining MySQL.pyd module 'works': PythonWin loads it
> __doc__: 'MySQLmodule-1.4: A Python interface to the MySQL database.'
> And with it in /bin/lib, "Z MySQL Database Connection"s
> are available in Zope/manage.
> 
> But, trying to 'test' a connection, with anything stronger than
> 'use tmm' crashes Zope:
> 
> PYTHON caused an invalid page fault in
> module MYSQL.PYD at 015f:012d3827.
> 
> MySQL (3.23.21-beta), for it's part, hears Zope calling, and
> try's to respond (the two tests in Zope were 'use tmm'
> and 'select * from country'):
> 
> C:\mysql\bin\mysqld.exe, Version: 3.23.21-beta-debug-log, started with:
> Tcp port: 3306  Unix socket: MySQL
> Time Id CommandArgument
> 000814 12:18:13   1 Connectroot@localhost on
>   1 Init DBtmm
> 000814 12:18:44   1 Query  use tmm
> 000814 12:19:02   1 Query  select * from country
> 
> Then it waits politely to be shut down:
> 
> 000814 12:21:42   2 Connectroot@localhost on
>   2 Shutdown
> 
> Is there a problem with MySQL.pyd, or perhaps something with my
> login procedure?
> 
> Zope has difficulty 'Computing default hostname' at start-up,
> and ends up using 'lap_will'.
> 
> Or am I formatting test queries in Zope incorrectly?
> When I run the same queries ('use tmm'; 'select * from country')
> in the mysqlc monitor, the log shows the transactions thus:
> 
> C:\mysql\bin\mysqld.exe, Version: 3.23.21-beta-debug-log, started with:
> Tcp port: 3306  Unix socket: MySQL
> Time Id CommandArgument
> 000814 12:26:14   1 Connectwcra@localhost as anonymous on
>   1 Query  show databases
>   1 Query  show tables
> 000814 12:26:31   1 Init DBtmm
>   1 Query  show databases
>   1 Query  show tables
>   1 Field List city
>   1 Field List country
>   1 Field List newspaper
> 000814 12:26:42   1 Query  select * from country
> 000814 12:26:47   1 Quit
> 000814 12:26:50   2 Connectroot@localhost on
>   2 Shutdown
> 
> Thanks to any and all for suggestions.
> 
> [Phil, I tried your pointer to http://www.dustman.com, but cannot
> his server seems dead or gone.]
> 
>   
>   Name: MySQL03.pyd
>MySQL03.pydType: unspecified type (application/octet-stream)
>   Encoding: base64
> 
>   Name: MySQL02.pyd
>MySQL02.pydType: unspecified type (application/octet-stream)
>   Encoding: base64
> 
>   Name: MySQL01.pyd
>MySQL01.pydType: unspecified type (application/octet-stream)
>   Encoding: base64

-- 
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] ZMySQLDA on Win32 - connect then crash

2000-08-09 Thread William BC Crandall

Phil Harris wrote:

> What version of MySQL are you using and also what version of the Zope
> Adapter?

> MySQL Server version: 3.23.21-beta-debug

Was using: ZMySQLDA-1.1.3-nonbin, as per your How-To.

Just got: ZMySQLDA-1-1-4 (most recent stable). Same problems.
Non-results SQL, 'use tmm', works, but 'show tables'
crashes Python/Zope.

I installed contents of ZMySQLDA-1-1-4 in:
 /lib/python/Products/ZMySQLDA


Thanks again,

William BC Crandall
Wiesbaden,  Germany
[EMAIL PROTECTED]





>
> - Original Message -
> From: "William BC Crandall" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 09, 2000 12:56 PM
> Subject: [Zope] ZMySQLDA on Win32 - connect then crash
>
> > Dear Phil:
> >
> > Thanks for your "How-To: ZMySQLDA on Win32 (2000/02/14)".
> > And for your inquiry about troubles with the set up.
> >
> > Following the steps you outlined, I was able to establish
> > a (very) minimal working connection. That is to say, I can
> > use Zope's 'Z MySQL Database Connection' 'Test' page with
> > the SQL command 'use tmm' (tmm is the name of my database),
> > with success:
> >
> > This statement returned no results.
> > ---
> >
> > SQL Used:
> >
> > use tmm
> >
> >
> > But, when I 'test' any more complex command
> > ('show tables', or 'select * from city'  --
> > all without the surrounding quotes ' ), Zope crashes.
> >
> > Specifically, I get a Window's message:
> >
> > 'Python: This program has performed an
> > illegal operation and will be shut down.'
> >
> > Details:
> > PYTHON executed an invalid instruction in
> > module  at :01670d74.
> > Registers:
> > EAX=017c81b1 CS=015f EIP=01670d74 EFLGS=00010286
> > EBX=0001 SS=0167 ESP=01c8fa90 EBP=01670d70
> > ECX=1e10f91f DS=0167 ESI= FS=1307
> > EDX= ES=0167 EDI=012d2a50 GS=
> > Bytes at CS:EIP:
> > f0 a2 2d 01 30 19 46 01 3d 43 3a 5c 02 00 00 00
> > Stack dump:
> > 00764580 1e16f958 00764580 
> > 00764580 1e10f831 00b4bb40 00764580
> >  00b4bb40 00f169f4 1e10e74c
> > 00b4bb40 00764580  00b04400
> >
> >
> > I am running MySQL with the --console option,
> > which recorded:
> >
> > C:\mysql\bin\mysqld.exe: ready for connections
> > 000809 12:53:27  Aborted connection 3 to db: 'tmm'
> > user: 'root' host: `localhost' (Unknown error)
> > 000809 12:53:27  Aborted connection 2 to db: 'tmm'
> > user: 'root' host: `localhost' (Unknown error)
> >
> >
> > My 'Z MySQL Database Connection' page shows:
> >
> > The Media Machine (connected) Status
> > Id tmm_db
> > Title  The Media Machine
> > Database Connection String tmm root
> >
> > The database connection is open.
> >
> >
> > My environment:
> > Windows 98 4.10.98
> > MySQL Server version: 3.23.21-beta-debug
> > Zope version: Zope 2.2.0 (binary release, python 1.5.2, win32-x86)
> > Python version: 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)]
> > Computer: Acer Extensa 710TE, PentiumII, 160MB RAM
> >
> > Thanks in andvance for any thoughts.
> >
> > 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 )


___
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] ZMySQLDA on Win32 - connect then crash

2000-08-09 Thread William BC Crandall

Dear Phil:

Thanks for your "How-To: ZMySQLDA on Win32 (2000/02/14)".
And for your inquiry about troubles with the set up.

Following the steps you outlined, I was able to establish
a (very) minimal working connection. That is to say, I can
use Zope's 'Z MySQL Database Connection' 'Test' page with
the SQL command 'use tmm' (tmm is the name of my database),
with success:

This statement returned no results.
---

SQL Used:

use tmm


But, when I 'test' any more complex command
('show tables', or 'select * from city'  --
all without the surrounding quotes ' ), Zope crashes.

Specifically, I get a Window's message:

'Python: This program has performed an
illegal operation and will be shut down.'

Details:
PYTHON executed an invalid instruction in
module  at :01670d74.
Registers:
EAX=017c81b1 CS=015f EIP=01670d74 EFLGS=00010286
EBX=0001 SS=0167 ESP=01c8fa90 EBP=01670d70
ECX=1e10f91f DS=0167 ESI= FS=1307
EDX= ES=0167 EDI=012d2a50 GS=
Bytes at CS:EIP:
f0 a2 2d 01 30 19 46 01 3d 43 3a 5c 02 00 00 00
Stack dump:
00764580 1e16f958 00764580 
00764580 1e10f831 00b4bb40 00764580
 00b4bb40 00f169f4 1e10e74c
00b4bb40 00764580  00b04400


I am running MySQL with the --console option,
which recorded:

C:\mysql\bin\mysqld.exe: ready for connections
000809 12:53:27  Aborted connection 3 to db: 'tmm'
user: 'root' host: `localhost' (Unknown error)
000809 12:53:27  Aborted connection 2 to db: 'tmm'
user: 'root' host: `localhost' (Unknown error)


My 'Z MySQL Database Connection' page shows:

The Media Machine (connected) Status
Id tmm_db
Title  The Media Machine
Database Connection String tmm root

The database connection is open.


My environment:
Windows 98 4.10.98
MySQL Server version: 3.23.21-beta-debug
Zope version: Zope 2.2.0 (binary release, python 1.5.2, win32-x86)
Python version: 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)]
Computer: Acer Extensa 710TE, PentiumII, 160MB RAM

Thanks in andvance for any thoughts.

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] ZMysqlDA

2000-06-24 Thread Jonothan Farr

Sorry for the delayed response. I just posted a patch for this on the Zope
site at http://www.zope.org/Members/jfarr/Patches

--jfarr

- Original Message -
From: Brenton Bills <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 22, 2000 12:06 AM
Subject: [Zope] ZMysqlDA



>
> Hi people, I am trying to get ZMysqlDA running on a 4.0 Release BSD
> machine, I have compiled this fine before on Linux but no luck on bsd. I
> am new to Bsd so if this is a bsd problem I appolagise in advance, but the
> ZMysqlda documentation is not clear on what libs are required.
>
> Python 1.5.2 manually compiled and installed (not part from ports).
>
> cc -fpic  -I/usr/local/include/mysql -I/usr/include/mysql -O -pipe
> -D_THREAD_SAFE -I/usr/local/include/python1.5
> -I/usr/local/include/python1.5 -DHAVE_CONFIG_H -c ./MySQLmodule.c
> ./MySQLmodule.c: In function `pythonify_row':
> ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
> ./MySQLmodule.c: In function `pythonify_res_fields':
> ./MySQLmodule.c:384: invalid lvalue in unary `&'
> ./MySQLmodule.c: In function `STH_fetchdict':
> ./MySQLmodule.c:1125: invalid lvalue in unary `&'
> ./MySQLmodule.c:1147: invalid lvalue in unary `&'
> *** Error code 1
>
> Brenton Bills.
>
>
> ___
> 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] ZMySQLDA 1.1.4 install problems

2000-06-03 Thread David Parker

I'm attempting to install ZMySQDA-1.1.4 on a RedHat 6.2 box with the
following configuration;

Zope 2.1.6-1
Zope-pcgi 2.1.6-1
Apache 1.3.12-2
Python 1.5.2-13  w/dev
MySQL 3.22.32   w/dev
MySQL-python 1.4-2

ZMySQLDA compiles fine and python imports ok. When I copy MySQLmodule.so
to the products directory and restart Zope, ZMySQLDA does not show up in
the Products list. All the above were installed from RPM binaries.  I
did manage to get ZMySQLDA working on a different machine with some
difficulty. I seem to have hit a different stumbling block this time.

Any suggestions?
David



___
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] ZMySQLDA fails to compile

2000-05-23 Thread David Parker



I fixed my own problem. The version of MySQL that I 
installed from source appended an extra directory (mysql) to the include and lib 
directories. I modified my Setup to reflect the full paths below.
/usr/web/databases/mysql/include/mysql
/usr/web/databases/mysql/lib/mysql
 
I then ran into a problem where I could not import 
MySQL from python. I kept getting;
ImportError: libmysqlclient.so.6
Turns out I had to modify /etc/ld.so.conf to 
reflect the full path to the libmysqlclient.so.6 object, then run ldconfig, then 
I could import MySQL into python.
 
David

  - Original Message - 
  From: 
  David 
  Parker 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, May 23, 2000 10:38 
AM
  Subject: [Zope] ZMySQLDA fails to 
  compile
  
  Configuration: Mandrake 7.02 with the 
  following;
   
  Zope 2.1.6-1 python 1.5.2MySQL-python 
  0.2.1-1 Mysql 3.22.32
  All the above were installed using binary RPMs 
  except for Mysql database. The path to mysql is
  /usr/web/databases/mysql
  I have a symbolic link to mysql at 
  /usr/local/mysql
   
  I've downloaded and extracted ZMySQLDA  
  1.1.4 to /usr/share/zope
   
  From the following location 
  /usr/share/zope/lib/python/Products/ZMySQLDA/src
  I've executed 
  make -f Makefile.pre.in boot
  make
   
  (I've tried editing Setup using the default and 
  following two paths)
   
  # MySQLmodule MySQLmodule.c 
  -I/usr/local/mysql/include -I/usr/include/mysql -L/usr/local/mysql/lib 
  -L/usr/lib/mysql -lmysqlclient -lm
  # MySQLmodule MySQLmodule.c 
  -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient 
  -lm
  MySQLmodule MySQLmodule.c 
  -I/usr/web/databases/mysql/include -L/usr/web/databases/mysql/lib 
  -lmysqlclient -lm
   
  I get the following error every 
  time...
   
  (mysql.h exists at 
  /usr/web/databases/mysql/include/mysql/mysql.h)
   
  [root@davweb src]# makegcc -fPIC  
  -I/usr/local/mysql/include -O3 -fomit-frame-pointer -fno-exceptions 
  -fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math 
  -fexpensive-optimizations -I/usr/include/python1.5 
  -I/usr/include/python1.5 -DHAVE_CONFIG_H -c 
  ./MySQLmodule.c./MySQLmodule.c:160: mysql.h: No such file or 
  directory./MySQLmodule.c:166: parse error before 
  `MYSQL'./MySQLmodule.c:166: warning: no semicolon at end of struct or 
  union./MySQLmodule.c:167: warning: data definition has no type or storage 
  class./MySQLmodule.c:170: parse error before `}'./MySQLmodule.c:170: 
  warning: data definition has no type or storage class./MySQLmodule.c:174: 
  parse error before `MYSQL_RES'
  continues


[Zope] ZMySQLDA fails to compile

2000-05-23 Thread David Parker



Configuration: Mandrake 7.02 with the 
following;
 
Zope 2.1.6-1 python 1.5.2MySQL-python 
0.2.1-1 Mysql 3.22.32
All the above were installed using binary RPMs 
except for Mysql database. The path to mysql is
/usr/web/databases/mysql
I have a symbolic link to mysql at 
/usr/local/mysql
 
I've downloaded and extracted ZMySQLDA  1.1.4 
to /usr/share/zope
 
From the following location 
/usr/share/zope/lib/python/Products/ZMySQLDA/src
I've executed 
make -f Makefile.pre.in boot
make
 
(I've tried editing Setup using the default and 
following two paths)
 
# MySQLmodule MySQLmodule.c 
-I/usr/local/mysql/include -I/usr/include/mysql -L/usr/local/mysql/lib 
-L/usr/lib/mysql -lmysqlclient -lm
# MySQLmodule MySQLmodule.c 
-I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient 
-lm
MySQLmodule MySQLmodule.c 
-I/usr/web/databases/mysql/include -L/usr/web/databases/mysql/lib 
-lmysqlclient -lm
 
I get the following error every 
time...
 
(mysql.h exists at 
/usr/web/databases/mysql/include/mysql/mysql.h)
 
[root@davweb src]# makegcc -fPIC  
-I/usr/local/mysql/include -O3 -fomit-frame-pointer -fno-exceptions 
-fno-rtti -pipe -s -mpentium -mcpu=pentium -march=pentium -ffast-math 
-fexpensive-optimizations -I/usr/include/python1.5 -I/usr/include/python1.5 
-DHAVE_CONFIG_H -c ./MySQLmodule.c./MySQLmodule.c:160: mysql.h: No 
such file or directory./MySQLmodule.c:166: parse error before 
`MYSQL'./MySQLmodule.c:166: warning: no semicolon at end of struct or 
union./MySQLmodule.c:167: warning: data definition has no type or storage 
class./MySQLmodule.c:170: parse error before `}'./MySQLmodule.c:170: 
warning: data definition has no type or storage class./MySQLmodule.c:174: 
parse error before `MYSQL_RES'
continues


[Zope] ZMySQLDA and dtml-in (bug?)

2000-05-22 Thread Morten W. Petersen

When I use an ZSQL method to fetch data, the manage test tab gives a
result of 14 items. When the same method is used in a dtml-in tag, with
batches of size 10, it only shows the first 10 items, with no "Show next x
missions". It previously showed "Show next 4 missions", but after altering
10 of the columns, only the 10 first objects get shown, with no "Show next
x missions". The ZSQL method always showed 14 objects before and after
alteration.

Basically, it's not faulty dtml scripting, the dtml-in tag only shows the
first 10 items, with no continual, after an alteration of 10 columns in
the SQL table.

This is Zope 2.1.6 on top of RedHat 6.2

-Morten

-
How to reply to email:
  http://home.sol.no/~vidaandr/news/OBSquoting.html (norsk)
  http://home.sol.no/~vidaandr/news/FAQquoting.html (english)

Who is the bigger fool? The fool or the fool who follows him?


___
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] ZMysqlDA

2000-05-22 Thread Phil Harris

Brenton,

What version of MySQL are you using?

Later versions have changed slightly and you need to edit MySQLmodule.c to
compensate.

I think if you remove the '&' in the lines mentioned in the error message it
should work ok, well it did for me.

hth

Phil
[EMAIL PROTECTED]

- Original Message -
From: "Brenton Bills" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 22, 2000 8:06 AM
Subject: [Zope] ZMysqlDA


>
> Hi people, I am trying to get ZMysqlDA running on a 4.0 Release BSD
> machine, I have compiled this fine before on Linux but no luck on bsd. I
> am new to Bsd so if this is a bsd problem I appolagise in advance, but the
> ZMysqlda documentation is not clear on what libs are required.
>
> Python 1.5.2 manually compiled and installed (not part from ports).
>
> cc -fpic  -I/usr/local/include/mysql -I/usr/include/mysql -O -pipe
> -D_THREAD_SAFE -I/usr/local/include/python1.5
> -I/usr/local/include/python1.5 -DHAVE_CONFIG_H -c ./MySQLmodule.c
> ./MySQLmodule.c: In function `pythonify_row':
> ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
> ./MySQLmodule.c: In function `pythonify_res_fields':
> ./MySQLmodule.c:384: invalid lvalue in unary `&'
> ./MySQLmodule.c: In function `STH_fetchdict':
> ./MySQLmodule.c:1125: invalid lvalue in unary `&'
> ./MySQLmodule.c:1147: invalid lvalue in unary `&'
> *** Error code 1
>
> Brenton Bills.
>
>
> ___
> 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] ZMysqlDA

2000-05-22 Thread Andrew Kenneth Milton

+[ Brenton Bills ]-
| 
| Hi people, I am trying to get ZMysqlDA running on a 4.0 Release BSD
| machine, I have compiled this fine before on Linux but no luck on bsd. I
| am new to Bsd so if this is a bsd problem I appolagise in advance, but the
| ZMysqlda documentation is not clear on what libs are required. 
| 
| Python 1.5.2 manually compiled and installed (not part from ports). 

You need to edit the src/Setup to change the locations for
the mysql includes and libraries:

-I/usr/local/include/mysql
-L/usr/local/lib/mysql

so you get a line that looks like:-

MySQLmodule MySQLmodule.c -I/usr/local/mysql/include -I/usr/include/mysql -L/usr
/local/mysql/lib -L/usr/lib/mysql -lmysqlclient -lm

Works for me d8)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[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] ZMysqlDA

2000-05-22 Thread Brenton Bills


Hi people, I am trying to get ZMysqlDA running on a 4.0 Release BSD
machine, I have compiled this fine before on Linux but no luck on bsd. I
am new to Bsd so if this is a bsd problem I appolagise in advance, but the
ZMysqlda documentation is not clear on what libs are required. 

Python 1.5.2 manually compiled and installed (not part from ports). 

cc -fpic  -I/usr/local/include/mysql -I/usr/include/mysql -O -pipe
-D_THREAD_SAFE -I/usr/local/include/python1.5
-I/usr/local/include/python1.5 -DHAVE_CONFIG_H -c ./MySQLmodule.c
./MySQLmodule.c: In function `pythonify_row':
./MySQLmodule.c:238: warning: assignment from incompatible pointer type
./MySQLmodule.c: In function `pythonify_res_fields':
./MySQLmodule.c:384: invalid lvalue in unary `&'
./MySQLmodule.c: In function `STH_fetchdict':
./MySQLmodule.c:1125: invalid lvalue in unary `&'
./MySQLmodule.c:1147: invalid lvalue in unary `&'
*** Error code 1

Brenton Bills.


___
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 )