Attachment 'fcg-modpy.diff'
Download 1 --- orig/wiki/cgi-bin/moin.fcg
2 +++ mod/wiki/cgi-bin/moin.fcg
3 @@ -8,8 +8,7 @@
4 """
5
6 #import sys
7 -#sys.path[0:0]=['/var/www/moin-main/lib/python',
8 -# '/var/www/moin-main/wiki']
9 +#sys.path[0:0]=['/path/to/moin/lib/python', '/path/to/moin/config']
10
11 from MoinMoin.request import RequestFastCGI
12 from MoinMoin.support import thfcgi
13 @@ -19,6 +18,7 @@
14 request.run()
15
16 if __name__ == '__main__':
17 + # this is a multi-threaded FastCGI
18 + # use thfcgi.unTHFCGI for a single-threaded instance
19 fcg = thfcgi.THFCGI(handle_request)
20 fcg.run()
21 -
22
23
24 --- orig/wiki/cgi-bin/moin_modpy.htaccess
25 +++ mod/wiki/cgi-bin/moin_modpy.htaccess
26 @@ -1,21 +1,44 @@
27 -#
28 -# (c) 2004 by Oliver Graf <ograf@bitart.de>
29 -#
30 -# .htaccess file for using mod_python with MoinMoin
31 -#
32 -# install as described in INSTALL.html
33 -#
34 -# copy this file to the document root and edit the paths to
35 -# match your configuration.
36 -#
37 -# Under wich path should the wiki be accessible?
38 +##
39 +## (c) 2004 by Oliver Graf <ograf@bitart.de>
40 +##
41 +## .htaccess file for using mod_python with MoinMoin
42 +##
43 +## copy this file to the path below which you want to have your wiki
44 +## instance and edit the paths to match your configuration.
45 +##
46 +# With which name should the wiki be accessible? (wiki)
47 <Files wiki>
48 -# Use mod_python as handler
49 +
50 + # Use mod_python as handler
51 SetHandler mod_python
52 -# set the path to the MoinMoin package and to the moin_config.py
53 - PythonPath "['/var/www/moin-main/lib/python','/var/www/moin-main/wikimodpy']+sys.path"
54 -# choose the ModPy Request class as handler
55 - PythonHandler MoinMoin.request::RequestModPy.run
56 +
57 + # add the path where the moin_modpy.py wrapper can be found
58 + PythonPath "['/path/to/moin/share/moin/cgi-bin']+sys.path"
59 +
60 + # use the moin_modpy wrapper to handle requests
61 + PythonHandler moin_modpy
62 +
63 </Files>
64 # voila.
65
66 +##
67 +## NOTE: due to a bug in mod_python 2.7.10, 3.0.4 and 3.1.2b you
68 +## need to use the wrapper above.
69 +##
70 +## If you fix this bug, you can use MoinMoin without the
71 +## wrapper. See MoinMoin INSTALL.html how to fix the bug.
72 +## Use the following htaccess with a fixed mod_python:
73 +##
74 +# With which name should the wiki be accessible? (wiki)
75 +#<Files wiki>
76 +#
77 +# # Use mod_python as handler
78 +# SetHandler mod_python
79 +#
80 +# # set the path to the MoinMoin package and to the moin_config.py
81 +# PythonPath "['/path/to/moin/lib/python','/path/to/moin/config']+sys.path"
82 +#
83 +# # choose the ModPy Request class as handler
84 +# PythonHandler MoinMoin.request::RequestModPy.run
85 +#
86 +#</Files>
87
88
89 --- orig/wiki/cgi-bin/moin_modpy.py
90 +++ mod/wiki/cgi-bin/moin_modpy.py
91 @@ -1,29 +1,29 @@
92 # -*- coding: iso-8859-1 -*-
93 """
94 MoinMoin - mod_python wrapper for broken mod_python versions
95 - (this affects up to 3.1.2b)
96
97 @copyright: 2004 by Oliver Graf <ograf@bitart.de>
98 @license: GNU GPL, see COPYING for details.
99 """
100 ##
101 -## put script into some path. add .htaccess:
102 -## <Files wikiname>
103 +## add a .htaccess to the path below which you want to have your
104 +## wiki instance:
105 +##
106 +## <Files wiki>
107 ## SetHandler mod_python
108 -## PythonPath "['/path/to/this/path']+sys.path"
109 +## PythonPath "['/path/to/moin/share/moin/cgi-bin']+sys.path"
110 ## PythonHandler moin_modpy
111 ## </Files>
112 ##
113 -## Note: this is a wrapper needed beause in a bug in mod_python < 3.1.2b
114 -## mod_python.apache.resolve_object failing to parse object with dots.
115 +## Note: this is a wrapper needed because of a bug in mod_python
116 +## 2.7.10, 3.0.4 and 3.1.2b.
117 ##
118 -## Version without bug (see also htaccess example in this path)
119 +## mod_python.apache.resolve_object fails to parse a object with dots.
120 ##
121 -## <Files wikiname>
122 -## SetHandler mod_python
123 -## PythonPath "['/path/to/moin/lib/python', '/path/to/moin/config']+sys.path"
124 -## PythonHandler MoinMoin.request::RequestModPy.run
125 -## </Files>
126 +## If you have a newer version, take a look at moin_modpy.htaccess
127 +## to see how to use MoinMoin without this wrapper. You can also
128 +## look into INSTALL.html to see how you can fix the bug on your own
129 +## (a simple one line change).
130 ##
131
132 #import sys
133 @@ -34,4 +34,3 @@
134 def handler(request):
135 moinreq = RequestModPy(request)
136 return moinreq.run(request)
137 -
138
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.