On 13 October 2011 08:36, p.schneider
<[email protected]> wrote:
> Hello,
>
> Im trying to setup mod_wsgi with python3.2 for 3 days now but it
> seems, I reached a dead-end.
>
> my test-wsgi-program (nearly 1:1 from tutorial):
> import sys
> sys.stdout = sys.stderr
Don't change sys.stdout line that, it is not needed.
> def application(environ, start_response):
> status = '200 OK'
> output = 'Hello World!'
This is not a valid Python 3.X WSGI application. The output must be
bytes, not a unicode string.
Use:
output = b'Hello World!'
> response_headers = [('Content-type', 'text/plain'),
> ('Content-Length', str(len(output)))]
> start_response(status, response_headers)
> print("still alive")
> return [output]
>
> I see the `still allive' in apache-error-log but nothing else on
> notice-level. The apache-conf is bloated up but I think its okay.. the
> application itself is reachable.
Did you check both main Apache error log and any virtual host error log file?
> my setup (its a server we rent, its everything but not up-to-date):
> mod_wsgi (checked out from repository and compiled manualy two days
> ago)
> python3.2m (compiled manualy, released on python-website)
> CentOs 5.5 (Linux 2.6.18)
>
> I need to replace every occurence of PyInt_FromLong with
> PyLong_FromLong to make it compile. Otherwise I got a linker-error.
> Might this indicate the real problem?
I fixed that yesterday, but hadn't committed change as I didn't think
I had committed the original code where I had the wrong code in the
first place. :-)
Is unrelated.
Graham
--
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.