On May 27, 9:57 pm, Julius Minka <j...@minka.sk> wrote:
> I found something in the archive.
> This seems to be multiple python versions issue, but still do not have a
> solution. Unfortunately, this server is preinstalled with python2.4 and
> I am trying to use 2.6, which can't be probably found undermod_wsgi
> Julius

It isn't an issue of it being found, the mod_wsgi module must be
explicitly compiled against the version of Python you intend using.
You cannot dynamically change what version of Python mod_wsgi uses. If
you are currently using a mod_wsgi binary rpm, you will need to remove
it, compile mod_wsgi from source code against the correct version of
Python and install it.

Graham

> V Štvrtok, 27. máj 2010 o 12:54 +0200, Julius Minka napísal(a):
>
>
>
> > I was too fast.
> > It works when accessed on port.
>
> > It doesn't when accessed throughmod_wsgi:
>
> > File "gluon/sql.py", line 3835, in DAL
> >     migrate=migrate, fake_migrate=fake_migrate)
> >   File "gluon/sql.py", line 959, in __init__
> >     self._pool_connection(lambda : psycopg2.connect(msg))
> >   File "gluon/sql.py", line 830, in _pool_connection
> >     self._connection = f()
> >   File "gluon/sql.py", line 959, in <lambda>
> >     self._pool_connection(lambda : psycopg2.connect(msg))
> > NameError: global name 'psycopg2' is not defined
>
> > how are both environments different?
> > Julius
>
> > V Štvrtok, 27. máj 2010 o 12:20 +0200, Julius Minka napísal(a):
> > > I found the reason by removing exception catching when connecting to
> > > Postgres in gluon/sql.py.
> > > It told me that this line
> > >       self._execute("SET standard_conforming_strings=on;")
> > > is a problem.
> > > I commented it out and everything is fine until now.
> > > Can this removal have a side effect?
> > > Julius
>
> > > V Štvrtok, 27. máj 2010 o 10:41 +0200, Julius Minka napísal(a):
> > > > I did that as first thing. No luck.
> > > > I changed it to IP as I it works from command line.
>
> > > > Julius
>
> > > > V Streda, 26. máj 2010 o 19:41 -0500, Thadeus Burgess napísal(a):
> > > > > Try
>
> > > > > postgres://w2p:passw...@localhost:5432/w2p
>
> > > > > --
> > > > > Thadeus
>
> > > > > On Wed, May 26, 2010 at 5:17 PM, Julius Minka <j...@minka.sk> wrote:
> > > > > > This is virtual server with centos 5.5 in internet.
> > > > > > I have successfully instaled web2py with Apache andmod_wsgibased
> > > > > > mainly on instructions from
> > > > > >http://web2py.com/AlterEgo/default/show/239and
> > > > > >http://web2py.com/AlterEgo/default/show/240
>
> > > > > > Probably last step is missing.
> > > > > > I am getting this error when accessing site from internet:
> > > > > > RuntimeError: Failure to connect to DB. Tried 5 times
>
> > > > > > when I start it from command line, it shows support for PostgreSQL:
> > > > > > python2.6 web2py/web2py.py -i xx.xx.xx.xx -p 7777 -a password
>
> > > > > > web2py Enterprise Web Framework
> > > > > > Created by Massimo Di Pierro, Copyright 2007-2010
> > > > > > Version 1.78.3 (2010-05-17 21:59:39)
> > > > > > Database drivers available: PostgreSQL
> > > > > > Starting hardcron...
> > > > > > WARNING:root:GUI not available because Tk library is not installed
> > > > > > please visit:
> > > > > >        http://......
>
> > > > > > I can verify access from command line:
> > > > > > psql -U w2p -d w2p -h 127.0.0.1 -p 5432
> > > > > > Password for user w2p:
> > > > > > Welcome to psql 8.1.21, the PostgreSQL interactive terminal.
>
> > > > > > Type:  \copyright for distribution terms
> > > > > >       \h for help with SQL commands
> > > > > >       \? for help with psql commands
> > > > > >       \g or terminate with semicolon to execute query
> > > > > >       \q to quit
>
> > > > > > w2p=# \q
>
> > > > > > It works.
>
> > > > > > In ... web2py/applications/welcome/models/db.py
> > > > > > db = DAL('postgres://w2p:passw...@127.0.0.1:5432/w2p')
>
> > > > > > What could be the problem? I have no further idea how to verify the
> > > > > > reason for failure of connection.
>
> > > > > > Julius

Reply via email to