I've used the ZPyGresSQLDA product for a couple of years now. Yet on my new installation of Zope with Python 2 I can't get the product installed. Anyone know of an adapter that works with the newest Zope and Python? Stuart
At 09:27 AM 5/29/01 -0700, you wrote:
I've used the ZPyGresSQLDA product for a couple of years now. Yet on my new installation of Zope with Python 2 I can't get the product installed. Anyone know of an adapter that works with the newest Zope and Python?
I run ZPyGreSQLDA, Python 2.x and Zope 2.2.x/2.3.x since January 2001 and everything works fine. What is your error? Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management
When Zope starts I get the error ImportError: /etc/zope/lib/python/Products/ZPyGreSQLDA/_pgmodules.o: undefined symbol PyObject_Init -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Stephan Richter Sent: Tuesday, May 29, 2001 9:37 AM To: Stuart Foster; zope@zope.org Subject: Re: [Zope] Need a good Postgres Database adapter. At 09:27 AM 5/29/01 -0700, you wrote:
I've used the ZPyGresSQLDA product for a couple of years now. Yet on my new installation of Zope with Python 2 I can't get the product installed. Anyone know of an adapter that works with the newest Zope and Python?
I run ZPyGreSQLDA, Python 2.x and Zope 2.2.x/2.3.x since January 2001 and everything works fine. What is your error? Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management _______________________________________________ Zope maillist - Zope@zope.org 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 )
Hello, I´m using Zope 2.3.2, PostgreSQL 7.1.2 and psycopg 0.99.2. Opening a database connection works well. I used the connection string: dbname=web Unfortunately if I want to test the connection using select * from testtable ; I get Error Type: ProgrammingError Error Value: ERROR: mitarbeiter: Permission denied. select * from testtable ; Looking at /var/log/postgres.log I see the following entries: 2001-06-19 14:05:24 [22300] DEBUG: connection: host=[local] user=www-data database=web 2001-06-19 14:05:43 [22300] ERROR: testtable: Permission denied. where www-data is the user which runs apache and zope on a Debian system. I made sure in psql: web=# grant all on testtable to "web-data" ; CHANGE but this does not help here. (I see no possibilty to test access of user www-data directly in psql because it is not a real user which has no login on the system - or is there any way to do that?). Any hints how to fix that? Kind regards Andreas.
[PostgreSQL]
dbname=web
No user name?
2001-06-19 14:05:24 [22300] DEBUG: connection: host=[local] user=www-data database=web 2001-06-19 14:05:43 [22300] ERROR: testtable: Permission denied.
With PostgreSQL, operating system users don't get access automatically. You must create a PostgreSQL user to connect as (defaults to OS user) and grant privileges. According to messages in the PostgreSQL list archive "www-data" is a special case, since PostgreSQL doesn't allow "-" in user names. I'm not sure if this still applies, since you mention a database user "web-data". Just search the list on http://fts.postgresql.org/db/mw/ with "permission denied". E.g.: http://fts.postgresql.org/db/mw/msg.html?mid=53327 http://fts.postgresql.org/db/mw/msg.html?mid=30785 And this of course (URL of local mirror): http://postgresql.demunnikservices.nl/users-lounge/docs/7.1/admin/user-manag .html http://postgresql.demunnikservices.nl/users-lounge/docs/7.1/admin/privileges .html Regards, René Pijlman
On Tue, 19 Jun 2001, Rene Pijlman wrote:
dbname=web
No user name?
2001-06-19 14:05:24 [22300] DEBUG: connection: host=[local] user=www-data database=web ... as you see the user is the user running the Zope server Is this a bad idea? If the answer is "yes" here I have to say that I tried the same with username and password. The result was the same: permission denied.
2001-06-19 14:05:43 [22300] ERROR: testtable: Permission denied.
With PostgreSQL, operating system users don't get access automatically. You must create a PostgreSQL user to connect as (defaults to OS user) and grant privileges. I did so. This is what I wanted to say with:
web=# grant all on testtable to "web-data" ; CHANGE which implies a "createuser web-data" at system prompt before. web=# select usename from pg_user; usename ---------- postgres tillea www-data (3 rows)
According to messages in the PostgreSQL list archive "www-data" is a special case, since PostgreSQL doesn't allow "-" in user names. I'm not sure if this still applies, since you mention a database user "web-data". You just have to enclose the username in "". If not you get errors in the grant clause.
Just search the list on http://fts.postgresql.org/db/mw/ with "permission denied". E.g.: http://fts.postgresql.org/db/mw/msg.html?mid=53327 http://fts.postgresql.org/db/mw/msg.html?mid=30785 I have looked at them and also tried to remap the username using pg_ident.conf but nothing helped. May be I should ask those kind of questions on a postgres-list ...
And this of course (URL of local mirror): http://postgresql.demunnikservices.nl/users-lounge/docs/7.1/admin/user-manag .html http://postgresql.demunnikservices.nl/users-lounge/docs/7.1/admin/privileges .html Well they are part of my Debian system but the things described there I have done ...
Kind regards Andreas.
dbname=web No user name? Is this a bad idea?
No, I didn't mean to suggest that. I just wanted to make sure what the PostgreSQL userid was.
web=# grant all on testtable to "web-data" ;
Who is this "web-data" guy? I thought he was called "www-data"? Regards, Rene Pijlman
On 29 May 2001 09:27:35 -0700, Stuart Foster wrote:
I've used the ZPyGresSQLDA product for a couple of years now. Yet on my new installation of Zope with Python 2 I can't get the product installed. Anyone know of an adapter that works with the newest Zope and Python?
mmmm ...psycop and ZPsycopDA ...mmmmm
On Wednesday 30 May 2001 00:27, Stuart Foster wrote:
I've used the ZPyGresSQLDA product for a couple of years now. Yet on my new installation of Zope with Python 2 I can't get the product installed. Anyone know of an adapter that works with the newest Zope and Python?
Stuart
my setup - zope2.3.2 python 1.5.2 postgresql -7.0.x i started with pygresql too, and moved to PoPy/ZPoPyDa. i'm now trying psycopg since i encountered too many hangs. dunno problems with my setup or PoPy anyways, checkout http://lists.initd.org/pipermail/psycopg/2001-April/000074.html. it'll save you hours of pain! (my head still aches) also, checkout the cvs version since you can specify whether to use mxDateTime object (which gives out auth error in zope) or Zope's Datetime good luck
participants (6)
-
bak -
Bill Anderson -
Rene Pijlman -
Stephan Richter -
Stuart Foster -
tillea@rki.de