Zope - postgres - pygressql - problem with pg_database
Hi there,
I'm trying to develop a wee web site with a few friends at the moment. We are hoping to use Zope with Postgres as a database.
We have installed postgres (successfully I hope). We can run queries against it from the python shell, via the pygresql module.
We have installed zope (successfully I hope). I have stored html and images in it.
I'm now trying to get the zpygresDA working. We've been trying for a couple of days, and we aren't having much luck. If we look at the packages available in Zope, zpygresql now shows a nice little box, rather than the broken little box we had until recently. I'm assuming this indicates it should work probably. However, when I try to connect to a db, it errors, and in the shell I ran netscape from, it says the db is not found in pg_database. To check that it is using the right copy of pg_database (even though there is only one), I tried renaming it. Zope then complained about not being able to find it, which indicates to me, that when named correctly, zope is looking at the right place for pg_database. I have also done a query against pg_database, and it shows the database 'np' is in there.
Help! Does anyone know why I could query against the 'np' database in a python shell, but that I can't even connect to it through Zope?
I look forward to your response.
Tim Haines tim_haines@hotmail.com
______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
Maybe the user nobody doesn't have permission to access the database... Check it.. -- Mauricio Souza Lima <mauricio@hiper.com.br> Hiperlógica <http://www.hiper.com.br> Automação de Web Sites | Web Site automation São Paulo | Brasil | Fone: +55-11-251-4894 Tim Haines wrote:
r.taylo-@eris.dera.gov.uk wrote: original article:http://www.egroups.com/group/zope/?start=12120
Hi there,
I'm trying to develop a wee web site with a few friends at the moment. We are hoping to use Zope with Postgres as a database.
We have installed postgres (successfully I hope). We can run queries against it from the python shell, via the pygresql module.
We have installed zope (successfully I hope). I have stored html and images in it.
I'm now trying to get the zpygresDA working. We've been trying for a couple of days, and we aren't having much luck. If we look at the packages available in Zope, zpygresql now shows a nice little box, rather than the broken little box we had until recently. I'm assuming this indicates it should work probably. However, when I try to connect to a db, it errors, and in the shell I ran netscape from, it says the db is not found in pg_database. To check that it is using the right copy of pg_database (even though there is only one), I tried renaming it. Zope then complained about not being able to find it, which indicates to me, that when named correctly, zope is looking at the right place for pg_database. I have also done a query against pg_database, and it shows the database 'np' is in there.
Help! Does anyone know why I could query against the 'np' database in a python shell, but that I can't even connect to it through Zope?
I look forward to your response.
Tim Haines tim_haines@hotmail.com
Tim One thing I would suggest. If the user used to run Zope is different from the one you are testing from, check that the Zope user has permissions on the database (check out the grant directive in psql) and a valid database user account (check out createuser in the postresql bin dir.). Hope this helps. Richard PS. Keep trying, I run a couple of web applications based on Zope and postgresql and have had little problem once I got the configuration sorted.
participants (3)
-
Mauricio Souza -
r.taylor@eris.dera.gov.uk -
Tim Haines