On 27 May 2011 09:54, Daniel O'Donovan <[email protected]> wrote:
>> The SetEnv would have no affect as that would only appear if WSGI
>> environ dictionary passed to request. Doesn't cause environment
>> variables to be set.
>
> I had suspected as much - thanks for the information.
>
>> For a standard Apache software foundation installation that hasn't
>> been morphed too much by the Linux distribution,
>
> I think this one has, but I've found an /etc/sysconfig/httpd that seems to do
> the job.
>
>>
>> The WSGIPythonHome directive should serve exactly the same purpose though.
>
> I am slightly confused by that, but I'm more than happy to have this working!
> Thank you many times.
I am confused by why there is a difference as well. All I do with that
directive is call Py_SetPythonHome() in Python API. The code being:
void
Py_SetPythonHome(char *home)
{
default_home = home;
}
char *
Py_GetPythonHome(void)
{
char *home = default_home;
if (home == NULL && !Py_IgnoreEnvironmentFlag)
home = Py_GETENV("PYTHONHOME");
return home;
}
When Python initialises itself it calls Py_GetPythonHome() at one
point and so what I set should just take precedence over environment
variable. So if value the same, should be fine.
The other thing to keep an eye out on is what is in the PATH
environment variable. By rights it shouldn't matter because if
Py_GetPythonHome() returns a value that should be used. If it isn't,
then Python searches PATH for 'python' executable and uses the
directory above that as PYTHONHOME.
So, that you had to manually set RPATH in mod_wsgi.so shouldn't matter
unless for some reason you have forced it to use wrong Python shared
library.
Graham
>> PYTHONVERBOSE=1
>> export PYTHONVERBOSE
>
> This in combination with
>
> $ sudo -H
>
> found a nice little crash that I would have spent a long time tracking down.
>
> Again thanks for the prompt and helpful advice - very much appreciated,
>
> Dan
>
> ----------------------
> Daniel O'Donovan
> [email protected]
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" 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/modwsgi?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" 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/modwsgi?hl=en.