I think it's obvious that the database is not the problem here.
Sessions weren't
working for him with a database store, despite the fact that he could
log requests
to the database.

The one question that I haven't seen asked is, are you sure you have cookies
enabled? I apologize for the absurdity of the question.

On Thu, Mar 26, 2009 at 4:20 AM, Thierry <[email protected]> wrote:
>
>> You have not supplied the 'user' and 'group' options to
>> WSGIDaemonProcess and with the exact same user and group that you are
>> running the webpy server as. That was the whole point of using daemon
>> mode in the first place. For further information on those options see:
>>
>>  http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDae...
>
> Ok, I have added the group, user and home directives to be the same as
> my interactive session
>  WSGIDaemonProcess tmain.ath.cx processes=2 threads=15 display-name=%
> {GROUP} user=tmo group=webdev home=/home/tmo
> With logLevel set, and after an restart, I see this in the error log:
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5205): Shutdown
> requested 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5205): Stopping
> process 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5205): Destroy
> interpreter 'aec.dev|'.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5205): Cleanup
> interpreter ''.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5205): Terminating
> Python.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5204): Shutdown
> requested 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5204): Stopping
> process 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5204): Destroy
> interpreter 'aec.dev|'.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5204): Cleanup
> interpreter ''.
>  [Thu Mar 26 09:10:41 2009] [info] mod_wsgi (pid=5204): Terminating
> Python.
>  [Thu Mar 26 09:10:42 2009] [info] mod_wsgi (pid=5351): Attach
> interpreter ''.
>  [Thu Mar 26 09:10:42 2009] [info] mod_wsgi (pid=5351): Enable
> deadlock thread in process 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:42 2009] [info] mod_wsgi (pid=5350): Attach
> interpreter ''.
>  [Thu Mar 26 09:10:42 2009] [info] mod_wsgi (pid=5350): Enable
> monitor thread in process 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:42 2009] [info] mod_wsgi (pid=5350): Enable
> deadlock thread in process 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:42 2009] [info] mod_wsgi (pid=5351): Enable
> monitor thread in process 'tmain.ath.cx'.
>  [Thu Mar 26 09:10:58 2009] [info] mod_wsgi (pid=5351): Create
> interpreter 'aec.dev|'.
>  [Thu Mar 26 09:10:58 2009] [info] [client 194.209.119.22] mod_wsgi
> (pid=5351, process='tmain.ath.cx', application='aec.dev|'): Loading
> WSGI script '/var/www/arc_en_ciel/htdocs/base.py'.
>  [Thu Mar 26 09:10:58 2009] [error] [client 194.209.119.22] <Storage
> {'msg': u'Pas de mot de passe sp\\xe9cifi\\xe9', 'logged': False}>
>
> on each requests. But the session still don't works.
> On the login page, if nothing is provided, I put a message in the
> session and redirect to the GET part of the class.
>
>> If when WSGI process runs as the exact same user, such that it has
>> exact same privileges, then we can discount directory/file
>> permissions.
>>
>> Beyond that other problems may be:
>>
>> 1. When you run webpy server, webpy or sqlite is making use of user
>> environment variables you have set which aren't then available to the
>> application when run under Apache/mod_wsgi.
>
> I have not (conscientiously) make the application rely on any
> environment variable.
>
>> 2. Your application has somewhere in its configuration or code a
>> dependence on the application being run in a specific directory. In
>> other words, it is using relative paths instead of absolute paths. One
>> way around that is to set the 'home' option to WSGIDaemonProcess to be
>> the same directory in which you were running the webpy server by hand.
>> Better still, eliminate dependencies on relative paths.
>
> I'm not sure that's the case.
> I base all my paths on the dirname of __file__, and construct the
> other path from that value.
> class config:
>  def __init__(self):
>    self.curPath = os.path.dirname(__file__)
>    self.basePath=os.path.join(self.curPath,'..')
>
>> 3. You are being affected by a clash between mod_cache in Apache and
>> sqlite which is causing sqlite to fail. This is a known issue due to a
>> class in symbol names. You need to disable mod_cache in Apache if
>> affected by this.
>
> I've checked, and mod_cache is not installed in apache.
> By the way, I tried to use postgresql as the session store at one
> moment, but the symptoms where the same.
>
> Thank you for the time you put in this, Graham.
> I really do appreciate it.
>
> Thierry.
> >
>



-- 
http://www.apgwoz.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to