problem apache2 CGI python MoinMoin (wiki)
The situation:
The server is called "aries"
Situatie now:
invoking the url shows the cgi-file the ScriptAlias directive in apache2.conf points to:
This is the CGI file
"
#! ~ python2.3
# -*- coding: iso-8859-1 -*-
"""
MoinMoin - CGI Driver Script
@copyright: 2000-2004 by Jürgen Hermann <jh@web.de>
@license: GNU GPL, see COPYING for details.
"""
from MoinMoin.request import RequestCGI
import os
if os.environ.get('QUERY_STRING') == 'test':
print "Content-Type: text/plain\n\nMoinMoin CGI Diagnosis\n======================\n"
try:
from MoinMoin.wikitest import runTest
print 'Package "MoinMoin" successfully imported.\n'
request = RequestCGI()
runTest(request)
except:
import sys, traceback, string, pprint
type, value, tb = sys.exc_info()
if type == ImportError:
print 'Your PYTHONPATH is:\n%s' % pprint.pformat(sys.path)
print "\nTraceback (innermost last):\n%s" % string.join(
traceback.format_tb(tb) + traceback.format_exception_only(type, value))
else:
request = RequestCGI()
request.run()
"
=======================
This looks as if apache2 finds the CGI file, but cannot execute the CGI file
So I tried to execute the python commands in the CGI-file at the command line:
Output on {aries}
root# python2.3
Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
[GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from MoinMoin.request import RequestCGI
~config.py:33: UserWarning:
import of moin_config failed due to "No module named moin_config";
default configuration used instead.
warnings.warn(msg)
>>> from MoinMoin.wikitest import runTest
>>> request = RequestCGI()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "~request.py", line 503,
in __init__
RequestBase.__init__(self, properties)
File "~request.py", line 63,
in __init__
self.dicts = self.initdicts()
File "~request.py", line 223,
in initdicts
dicts.scandicts()
File "~wikidicts.py", line
253, in scandicts
pagelist = wikiutil.getPageList(config.text_dir)
File "~wikiutil.py", line
274, in getPageList
pages = os.listdir(text_dir)
OSError: [Errno 2] No such file or directory: 'wiki/data/text'
>>> runTest(request)
File "<stdin>", line 1
runTest(request)
^
SyntaxError: invalid syntax
>>>
"
It would be very helpfull, for a newbie as myself, if someone could give a hint to make moinmoin work on this server.
Tnx in advance
__
|