From twh at ibex-ag.de Mon Dec 1 01:11:02 2003 From: twh at ibex-ag.de (Horna, Thomas) Date: Mon Dec 1 01:11:02 2003 Subject: [Moin-devel] RE: [Moin-user] MoinMoin 1.1 is out Message-ID: <5565C2CC52B97F4485E3345CC584A9F2ABEB@AFE2K1.de.ibex-ag.de> Congrats! > -----Original Message----- > From: moin-user-admin at lists.sourceforge.net > [mailto:moin-user-admin at lists.sourceforge.net]On Behalf Of Thomas > Waldmann > Sent: Saturday, November 29, 2003 11:23 PM > To: moin-user at lists.sourceforge.net; moin-devel at lists.sourceforge.net > Subject: [Moin-user] MoinMoin 1.1 is out > > > Get it from http://moin.sf.net/. > > Thanks to all developers that helped getting this done. > > > > > > From r.bauer at fz-juelich.de Mon Dec 1 07:18:05 2003 From: r.bauer at fz-juelich.de (Reimar Bauer) Date: Mon Dec 1 07:18:05 2003 Subject: [Moin-devel] Disable this account forever Message-ID: <3FCB5B9C.10400@fz-juelich.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi the item "Disable this account forever" in user preferences should be written in red color and I would prefer to see it in a second column. In the past I often have selected all switches first. It is bad to have there one to kill the account. .... regards Reimar - -- Reimar Bauer Institut fuer Stratosphaerische Chemie (ICG-I) Forschungszentrum Juelich email: R.Bauer at fz-juelich.de - ------------------------------------------------------------------- ~ a IDL library at ForschungsZentrum Juelich ~ http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro.html =================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/y1ua5aOc3Q9hk/kRAlRWAKCrYY3D2+bsoTD2o5rrWg4N3aDeVwCgpTWT go3hmDU2CPJZ2fRQWOcUogo= =6Gcm -----END PGP SIGNATURE----- From karl at la-grange.net Mon Dec 1 08:38:07 2003 From: karl at la-grange.net (Karl Dubost) Date: Mon Dec 1 08:38:07 2003 Subject: [Moin-devel] Re: [Moin-user] MoinMoin 1.1 is out In-Reply-To: <3FC91C38.3060305@gmx.de> References: <3FC91C38.3060305@gmx.de> Message-ID: Le 29 nov. 2003, ? 17:22, Thomas Waldmann a ?crit : > Get it from http://moin.sf.net/. > > Thanks to all developers that helped getting this done. Congratulations. Already installed on the Pompeurs Website http://www.publishtogether.com/pompeurs/ Which is advocating for Web Standards... with an invalid Wiki site :p Thomas, do you know when the rendering engine will be modified to permit validity? I have seen a few Moimoin wiki which manages to validate after heaving code editing I guess. -- Karl Dubost From r.bauer at fz-juelich.de Tue Dec 2 02:36:02 2003 From: r.bauer at fz-juelich.de (Reimar Bauer) Date: Tue Dec 2 02:36:02 2003 Subject: [Moin-devel] virtual host and email Message-ID: <3FCC6A6B.5080507@fz-juelich.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all I found today a problem whith multiple virtual servers. I have set up for each wiki an alias name which is then added as virtual host configuration to the apache configuration. Then I tried one of the aliases. All wiki functions are working without the email notification configuration. This works only if I use the original name. In user/preferences the email button is missing and so on. Normally this result is given if the entries mail_from, mail_smarthost are mssing. But they are defined. Any idea is welcome Reimar - -- Reimar Bauer Institut fuer Stratosphaerische Chemie (ICG-I) Forschungszentrum Juelich email: R.Bauer at fz-juelich.de - ------------------------------------------------------------------- ~ a IDL library at ForschungsZentrum Juelich ~ http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro.html =================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/zGpp5aOc3Q9hk/kRAiSuAJ4jXdRmn+CubtuGwz/KPZZ+ecE/9wCbBtSI vUOyiO+YujmNo+tu3bemx6c= =LSex -----END PGP SIGNATURE----- From R.Bauer at fz-juelich.de Tue Dec 2 14:13:02 2003 From: R.Bauer at fz-juelich.de (Reimar Bauer) Date: Tue Dec 2 14:13:02 2003 Subject: [Moin-devel] missing send mail button solved - my fault Message-ID: <3FCD0E0A.5030309@fz-juelich.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear all, sorry for the last mail. It was definitfly my fault, I haven't seen that there was a cookie active while I switched from an alias name to the normal hostname. If the user is really logged off the button is at the right place and it works. I'll try to do more tests before I do the next "I have a problem" posting. regards Reimar - -- Forschungszentrum Juelich email: R.Bauer at fz-juelich.de http://www.fz-juelich.de/icg/icg-i/ ================================================================== a IDL library at ForschungsZentrum Juelich http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE/zQ4I5aOc3Q9hk/kRAiRPAKCpWfu+biLmDlEvgM32ZxjgZ7RVjwCgklkW cCNe8dFj94+kM/69d/YxdnI= =7/rZ -----END PGP SIGNATURE----- From noreply at sourceforge.net Thu Dec 4 00:28:01 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Dec 4 00:28:01 2003 Subject: [Moin-devel] [ moin-Bugs-846518 ] Reduce editor size: changes lost Message-ID: Bugs item #846518, was opened at 2003-11-21 12:35 Message generated for change (Comment added) made by jsabt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108482&aid=846518&group_id=8482 Category: None Group: None Status: Closed Resolution: None Priority: 5 Submitted By: Johannes Abt (jsabt) Assigned to: Nobody/Anonymous (nobody) Summary: Reduce editor size: changes lost Initial Comment: On the "EditText" page, when modify the text and then click on "reduce editor size" after , my modifications are lost. I am using moinmoin 1.0. ---------------------------------------------------------------------- >Comment By: Johannes Abt (jsabt) Date: 2003-12-04 09:27 Message: Logged In: YES user_id=584057 Of course, it is not possible to fix this as long as "Reduce editor size" is just a link. Though you could transform it into a submit button, just like "Save Changes", "Preview", "Check Spelling" and "Cancel". ---------------------------------------------------------------------- Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-11-30 00:58 Message: Logged In: YES user_id=100649 This is a problem in principle and can't be fixed. As long as you don't save (or preview) your changes, they exist in the browser only. So don't do content changes before reducing editor size. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108482&aid=846518&group_id=8482 From noreply at sourceforge.net Thu Dec 4 00:29:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Dec 4 00:29:03 2003 Subject: [Moin-devel] [ moin-Bugs-846518 ] Reduce editor size: changes lost Message-ID: Bugs item #846518, was opened at 2003-11-21 12:35 Message generated for change (Settings changed) made by jsabt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108482&aid=846518&group_id=8482 Category: None Group: None >Status: Open Resolution: None Priority: 5 Submitted By: Johannes Abt (jsabt) Assigned to: Nobody/Anonymous (nobody) Summary: Reduce editor size: changes lost Initial Comment: On the "EditText" page, when modify the text and then click on "reduce editor size" after , my modifications are lost. I am using moinmoin 1.0. ---------------------------------------------------------------------- Comment By: Johannes Abt (jsabt) Date: 2003-12-04 09:27 Message: Logged In: YES user_id=584057 Of course, it is not possible to fix this as long as "Reduce editor size" is just a link. Though you could transform it into a submit button, just like "Save Changes", "Preview", "Check Spelling" and "Cancel". ---------------------------------------------------------------------- Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-11-30 00:58 Message: Logged In: YES user_id=100649 This is a problem in principle and can't be fixed. As long as you don't save (or preview) your changes, they exist in the browser only. So don't do content changes before reducing editor size. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108482&aid=846518&group_id=8482 From moindev at yahoo.com Thu Dec 4 06:30:02 2003 From: moindev at yahoo.com (MoinDev MoinMoin) Date: Thu Dec 4 06:30:02 2003 Subject: [Moin-devel] (no subject) Message-ID: <20031204142929.81418.qmail@web12901.mail.yahoo.com> Hi, Suppose I want to submit the changes I've made to the sources of my local wiki to the CVS version. What is the easiest way to do this? Gr. Marcel --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Tue Dec 9 00:42:05 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 9 00:42:05 2003 Subject: [Moin-devel] [ moin-Patches-815510 ] Add support for diffs between arbitrary versions Message-ID: Patches item #815510, was opened at 2003-10-01 01:48 Message generated for change (Comment added) made by thomaswaldmann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=308482&aid=815510&group_id=8482 Category: None Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Steve McIntyre (steve_mcintyre) Assigned to: Nobody/Anonymous (nobody) Summary: Add support for diffs between arbitrary versions Initial Comment: This should work; if you have any problems, shout at me. We've got a large number of changes in our local moin and I'm trying to split them out into manageable chunks. This patch adds: Support for two dates to be specified for diffs Changes to the revision history page so you can specify two versions to diff. ---------------------------------------------------------------------- >Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-12-09 09:41 Message: Logged In: YES user_id=100649 merged into moin--main--1.2 (devel version) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=308482&aid=815510&group_id=8482 From noreply at sourceforge.net Wed Dec 10 17:33:00 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Dec 10 17:33:00 2003 Subject: [Moin-devel] [ moin-Feature Requests-857978 ] Plugin for code download Message-ID: Feature Requests item #857978, was opened at 2003-12-11 01:32 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=857978&group_id=8482 Category: None Group: None Status: Open Priority: 5 Submitted By: Osvaldo Santana Neto (acidbase) Assigned to: Nobody/Anonymous (nobody) Summary: Plugin for code download Initial Comment: I've a interesting idea for a Moin plugin. After code blocks like: {{{ #!python import os }}} Moin could put a "Download example1.py" link to make a download of the program. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=857978&group_id=8482 From Fscruplef at NETSCAPE.NET Thu Dec 11 21:12:01 2003 From: Fscruplef at NETSCAPE.NET (Ulerrama) Date: Thu Dec 11 21:12:01 2003 Subject: [Moin-devel] Sieeeep Beetteer, Improvee Vision And Meemory Message-ID: An HTML attachment was scrubbed... URL: From jh at web.de Thu Dec 11 22:01:04 2003 From: jh at web.de (Juergen Hermann) Date: Thu Dec 11 22:01:04 2003 Subject: [Moin-devel] Re: Custom "actions" line In-Reply-To: <20031106090019.GA27778@via.ecp.fr> Message-ID: On Thu, 6 Nov 2003 10:00:19 +0100, Antoine Brenner wrote: > * Add some new actions, for instance a new action = "info" here > (We have one in the icons, but hard to find/use) > * Remove some as well (There is no point offering 'SpellCheck' > until it is configured...) To add actions, you simply drop them into the action or the plugin/action dirs. To remove actions, you delete the relevant *.py files. To hide actions, you name them all lowercase. So there is no real need for yet another option. Ciao, J?rgen From jh at web.de Thu Dec 11 22:03:01 2003 From: jh at web.de (Juergen Hermann) Date: Thu Dec 11 22:03:01 2003 Subject: [Moin-devel] wiki to document (e.g. PDF) conversion In-Reply-To: Message-ID: >> > Now, I'd just like to be able to click on a button and dump the >> > structured record to a document. An easier way to achieve print quality output would be to finish the ReST parser. For ReST, docutils provide an existing workflow for paper output processing. The unfinished parsre mainly lacks support for some more exotic and complex elements. Ciao, J?rgen From srikanth.kotha at bankofamerica.com Fri Dec 19 11:14:01 2003 From: srikanth.kotha at bankofamerica.com (Kotha, Srikanth) Date: Fri Dec 19 11:14:01 2003 Subject: [Moin-devel] problem getting test page to work Message-ID: <9510DF2FECA8D311816800508B6F478E11591C78@chitmd19.nt.il.nbgfn.com> Hi, I've installed MoinMoin 1.1 according to the instructions but am unable to get the test page to come up successfully. Here are the details of the installation MoinMoin version: 1.1 Python version: 2.2.1 Apache version: 2.0.48 OS: Sun Solaris and here's what shows up when I try to load the test page MoinMoin CGI Diagnosis ====================== Package "MoinMoin" successfully imported. Your PYTHONPATH is: ['/Net/clinton/users/nbkyokk/public_html', '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2', '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/plat-sunos5', '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-tk', '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-dynload', '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/site-packages', '/Net/clinton/users/nbkyokk/wiki', '/Net/clinton/users/nbkyokk/programs/moin/lib/python'] Traceback (innermost last): File "/Net/clinton/users/nbkyokk/public_html/moin.cgi", line 22, in ? cgimain.test() File "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/cgimain.py", line 26, in test request = createRequest(properties) File "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/cgimain.py", line 21, in createRequest return Request(properties) File "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/request.py", line 48, in __init__ self.user = user.User(self) File "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/user.py", line 180, in __init__ self.may = Default(self) File "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/security.py", line 36, in __init__ from MoinMoin.Page import Page File "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/Page.py", line 12, in ? import cStringIO, os, re, sys, string, urllib File "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/urllib.py", line 26, in ? import socket File "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/socket.py", line 41, in ? from _socket import * ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file /Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-dynload/_socke t.so: symbol gai_strerror: referenced symbol not found Would really appreciate if someone could let me know what the problems is and how to resolve it. thanks, Srikanth. From srikanth.kotha at bankofamerica.com Fri Dec 19 12:00:01 2003 From: srikanth.kotha at bankofamerica.com (Kotha, Srikanth) Date: Fri Dec 19 12:00:01 2003 Subject: [Moin-devel] problem getting test page to work Message-ID: <9510DF2FECA8D311816800508B6F478E11591C7B@chitmd19.nt.il.nbgfn.com> > Hi, > > I've installed MoinMoin 1.1 according to the instructions but am unable to > get the test page to come up successfully. Here are the details of the > installation > > MoinMoin version: 1.1 > Python version: 2.2.1 > Apache version: 2.0.48 > OS: Sun Solaris > > and here's what shows up when I try to load the test page > > MoinMoin CGI Diagnosis > ====================== > > Package "MoinMoin" successfully imported. > > Your PYTHONPATH is: > ['/Net/clinton/users/nbkyokk/public_html', > '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2', > '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/plat-sunos5', > '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-tk', > '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-dynload', > > '/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/site-packages', > '/Net/clinton/users/nbkyokk/wiki', > '/Net/clinton/users/nbkyokk/programs/moin/lib/python'] > > Traceback (innermost last): > File "/Net/clinton/users/nbkyokk/public_html/moin.cgi", line 22, in ? > cgimain.test() > File > "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/cgimain.py", > line 26, in test > request = createRequest(properties) > File > "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/cgimain.py", > line 21, in createRequest > return Request(properties) > File > "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/request.py", > line 48, in __init__ > self.user = user.User(self) > File > "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/user.py", > line 180, in __init__ > self.may = Default(self) > File > "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/security.py" > , line 36, in __init__ > from MoinMoin.Page import Page > File > "/Net/clinton/users/nbkyokk/programs/moin/lib/python/MoinMoin/Page.py", > line 12, in ? > import cStringIO, os, re, sys, string, urllib > File > "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/urllib.py", > line 26, in ? > import socket > File > "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/socket.py", > line 41, in ? > from _socket import * > ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: > file > /Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-dynload/_soc > ket.so: symbol gai_strerror: referenced symbol not found > > Would really appreciate if someone could let me know what the problems is > and how to resolve it. > > thanks, > Srikanth. > From noreply at sourceforge.net Fri Dec 19 20:08:12 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Dec 19 20:08:12 2003 Subject: [Moin-devel] [ moin-Feature Requests-863361 ] Standard Content Storage API Message-ID: Feature Requests item #863361, was opened at 2003-12-20 05:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=863361&group_id=8482 Category: None Group: None Status: Open Priority: 5 Submitted By: Markus Elfring (elfring) Assigned to: Nobody/Anonymous (nobody) Summary: Standard Content Storage API Initial Comment: Would you like to support content storage independence? Content Repository http://jcp.org/en/jsr/detail?id=170 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=863361&group_id=8482 From pf_moore at yahoo.co.uk Sat Dec 20 05:01:02 2003 From: pf_moore at yahoo.co.uk (Paul Moore) Date: Sat Dec 20 05:01:02 2003 Subject: [Moin-devel] Development version and Twisted Message-ID: I understand that the development version includes Twisted support. I'd like to try this, partly as a way of experimenting with Twisted, and partly to avoid needing to install Apache. How do I get the development version? From the web pages, it seems that I need to use "arch", but I haven't been able to find a version for Windows (I don't have Linux installed ATM). Is there a snapshot available? I get the impression that the nightly snapshots on moin.sf.net are from CVS (and hence not of the 1.2 development branch). Thanks, Paul -- This signature intentionally left blank From festifn at rupert.informatik.uni-stuttgart.de Sat Dec 20 23:56:02 2003 From: festifn at rupert.informatik.uni-stuttgart.de (Florian Festi) Date: Sat Dec 20 23:56:02 2003 Subject: [Moin-devel] problem getting test page to work In-Reply-To: <9510DF2FECA8D311816800508B6F478E11591C78@chitmd19.nt.il.nbgfn.com> Message-ID: > MoinMoin version: 1.1 > Python version: 2.2.1 > Apache version: 2.0.48 > OS: Sun Solaris > import cStringIO, os, re, sys, string, urllib > File > "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/urllib.py", line > 26, in ? > import socket > File > "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/socket.py", line > 41, in ? > from _socket import * > ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file > /Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-dynload/_socke > t.so: symbol gai_strerror: referenced symbol not found Looks like your Python installation is dammaged or buggy (Python 2.2.1 is known to have some serious bugs). Try: import urllib import socket in the interpreter to verify this. If the import works it is possible that some environment variables are not set properly in the CGI environment of the webserver, but this is not very likely. Consider updating to Python 2.2.2 or even better 2.3.2 and try compiling it on that maschine. Hope that helps FlorianFesti From festifn at rupert.informatik.uni-stuttgart.de Sun Dec 21 00:16:01 2003 From: festifn at rupert.informatik.uni-stuttgart.de (Florian Festi) Date: Sun Dec 21 00:16:01 2003 Subject: [Moin-devel] Development version and Twisted In-Reply-To: Message-ID: > I understand that the development version includes Twisted support. > I'd like to try this, partly as a way of experimenting with Twisted, > and partly to avoid needing to install Apache. > > How do I get the development version? From the web pages, it seems > that I need to use "arch", but I haven't been able to find a version > for Windows (I don't have Linux installed ATM). Is there a snapshot > available? I get the impression that the nightly snapshots on > moin.sf.net are from CVS (and hence not of the 1.2 development > branch). AFAIK there is no Windows client for arch yet. Because of this we added a tarball only some days before. It can be found on the page of our arch repository: http://thinkmo.de/ArchRepository or directly here: http://arch.thinkmo.de/moin--main--1.2.tar.gz But be warned: The 1.2 branch is under heavy development and the nightly builds are much less stable than they used to be in the 1.1 line. They definetly should not be used in productive environments. AFAIK even the UI is broken because of the upcomming skinning support. Nevertheless are testers welcome. cu FlorianFesti From srikanth.kotha at bankofamerica.com Sun Dec 21 15:22:00 2003 From: srikanth.kotha at bankofamerica.com (Kotha, Srikanth) Date: Sun Dec 21 15:22:00 2003 Subject: [Moin-devel] problem getting test page to work Message-ID: <9510DF2FECA8D311816800508B6F478E11591C7E@chitmd19.nt.il.nbgfn.com> Florian and Thomas, The problem seemed to be because of the python installation as you mentioned. I switched to python 2.3.2 and it's working fine now. Thanks for the help. Srikanth. -----Original Message----- From: Florian Festi [mailto:festifn at rupert.informatik.uni-stuttgart.de] Sent: Sunday, December 21, 2003 1:56 AM To: Kotha, Srikanth Cc: moin-user at lists.sourceforge.net; moin-devel at lists.sourceforge.net Subject: Re: [Moin-devel] problem getting test page to work > MoinMoin version: 1.1 > Python version: 2.2.1 > Apache version: 2.0.48 > OS: Sun Solaris > import cStringIO, os, re, sys, string, urllib > File > "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/urllib.py", line > 26, in ? > import socket > File > "/Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/socket.py", line > 41, in ? > from _socket import * > ImportError: ld.so.1: /usr/local/bin/python: fatal: relocation error: file > /Net/chiffd01/sun_binlib5/local/python2.2.1/lib/python2.2/lib-dynload/_socke > t.so: symbol gai_strerror: referenced symbol not found Looks like your Python installation is dammaged or buggy (Python 2.2.1 is known to have some serious bugs). Try: import urllib import socket in the interpreter to verify this. If the import works it is possible that some environment variables are not set properly in the CGI environment of the webserver, but this is not very likely. Consider updating to Python 2.2.2 or even better 2.3.2 and try compiling it on that maschine. Hope that helps FlorianFesti From pf_moore at yahoo.co.uk Sun Dec 21 15:31:03 2003 From: pf_moore at yahoo.co.uk (Paul Moore) Date: Sun Dec 21 15:31:03 2003 Subject: [Moin-devel] Re: Development version and Twisted References: Message-ID: Florian Festi writes: > The 1.2 branch is under heavy development and the nightly builds are much > less stable than they used to be in the 1.1 line. They definetly should > not be used in productive environments. AFAIK even the UI is broken > because of the upcomming skinning support. > > Nevertheless are testers welcome. It wasn't hard to get something basic running. I needed to edit twisted-moin quite heavily (I'll post it here, even though it could use some tidying up). Once I'd done this, I created an instance directory as follows: ...\MoinInstance twisted-moin.py moin_config.py data -- copy of the "data" directory installed with MoinMoin Then starting MoinMoin was simply a case of C:\Apps\Python\Scripts\twistd.py --python=startmoin.py -n The only problem I see so far is that the icon for Wiki: and MoinMoin: links is not found. The URL for the image shows as http://localhost:8888/classic/img/moin-inter.png (note the lack of a /wiki/ path element before /classic/). I can't see an obvious place I've failed to configure, but I'll keep looking - it seems to work right on the MoinMoin website. Paul. ---- twisted-moin.py ---- from twisted.web import script, static, server, vhost, resource, util from twisted.internet import app, threads, reactor import random import sys, os # Add the directory of this file to sys.path sys.path.append(os.path.dirname(os.path.abspath(__file__))) from MoinMoin.request import RequestTwisted RESOURCES = os.path.join(sys.prefix, "share", "moin", "htdocs") PORT = 8888 # User/group to run under # Usually, it runs under the www-data user and group. UID = 'www-data' GID = 'www-data' from twisted.python import threadable threadable.init(1) class WikiResource(resource.Resource): isLeaf = 1 def render(self, request): return server.NOT_DONE_YET class WikiRoot(resource.Resource): def getChild(self, name, request): if request.prepath == [] and name == 'wiki': return resource.Resource.getChild(self, name, request) else: req = RequestTwisted(request, name, reactor) threads.deferToThread(req.run) return WikiResource() # The root of the HTTP hierarchy default = WikiRoot() # here is where img and css come from default.putChild('wiki', static.File(RESOURCES)) # set logfile name. # This is the *Apache compatible* log file, not the twisted-style logfile. # Leaving this as None will have no Apache compatible log file. Apache # compatible logfiles are useful because there are quite a few programs # which analyse them and display statistics. logPath = None # Allow the requestor to tell us which host we are # default.putChild('vhost', vhost.VHostMonsterResource()) # Make sure it is easy to add new virtual hosts: root = vhost.NameVirtualHost() root.default = default # To add virtual hosts # exampleRoot = static.File('/var/vhosts/example') # root.addHost('localhost', default) # Generate the Site factory. You will not normally # want to modify this line. site = server.Site(root, logPath=logPath) # Set user/group to run under # Usually, it runs under the www-data user and group. uid = None gid = None try: import pwd, grp uid = pwd.getpwnam(UID)[2] gid = grp.getgrnam(GID)[2] except ImportError: pass # Generate the Application. You will not normally # want to modify this line. application = app.Application("web", uid=uid, gid=gid) application.listenTCP(PORT, site) From pf_moore at yahoo.co.uk Mon Dec 22 13:29:03 2003 From: pf_moore at yahoo.co.uk (Paul Moore) Date: Mon Dec 22 13:29:03 2003 Subject: [Moin-devel] Re: Development version and Twisted References: Message-ID: Paul Moore writes: > It wasn't hard to get something basic running. I've hacked on this a bit more, and have got a setup which supports the Twisted "mktap" framework. I've attached the necessary files - unzip the archive into your MoinMoin package directory (.../lib/site-packages/MoinMoin) and that should be all. To create a ".tap" file, just do mktap MoinMoin -p -d -l -I can default (the default is None, ie, log to stdout). defaults to 8080. should be specified as the location of the "shared" htdocs (where img and CSS files come from). For my Windows setup, this is C:\Apps\Python\share\moin\htdocs, but I'm not sure there is a useful default. is the directory of the instance - it's where the moin_config.py file is stored, and where the server's current directory is at the start (so data_dir = './data/' in moin_config.py works). To run the server, just do twistd -f MoinMoin.tap MoinMoin.tap is the file created by mktap above. Hope this is useful, Paul. -------------- next part -------------- A non-text attachment was scrubbed... Name: twisted-support.zip Type: application/zip Size: 1568 bytes Desc: Twisted support files URL: -------------- next part -------------- -- This signature intentionally left blank From pf_moore at yahoo.co.uk Tue Dec 23 04:43:02 2003 From: pf_moore at yahoo.co.uk (Paul Moore) Date: Tue Dec 23 04:43:02 2003 Subject: [Moin-devel] Re: Development version and Twisted References: Message-ID: Paul Moore writes: > I've hacked on this a bit more, and have got a setup which supports > the Twisted "mktap" framework. I found the problem with the InterWiki icons. Because Twisted "tap" files are pickles of the application state, they also pickle the moin_config information. Unfortunately, I had not redone "mktap" at one point, and I was seeing an old config, even though I'd fixed the code to load the correct one :-( So, AFAICT, the files I posted yesterday do in fact result in a fully working MoinMoin instance. (BTW, I took out the UID/GID support, as mktap handles that for you - do mktap --help to see the standard options.) Paul. -- This signature intentionally left blank From noreply at sourceforge.net Tue Dec 23 05:33:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 23 05:33:02 2003 Subject: [Moin-devel] [ moin-Bugs-531617 ] no valid html/xhtml Message-ID: Bugs item #531617, was opened at 2002-03-18 23:29 Message generated for change (Comment added) made by thomaswaldmann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108482&aid=531617&group_id=8482 Category: None Group: None >Status: Closed Resolution: Wont Fix Priority: 6 Submitted By: Ronny Buchmann (rbla) Assigned to: Nobody/Anonymous (nobody) Summary: no valid html/xhtml Initial Comment: as everybody knows moinmoin doesn't produce valid html. i consider this a bug. i have a patch for valid html 4.01 transitional code. the patch is safe (i think) and doesnt change look, with one exception: the search buttons cant have attributes like images (hspace, border etc), only css is allowed, but netscape 4.x doesnt understand it right, so it looks a bit different (borders!). please test and apply (at least the other chunks) ronny ---------------------------------------------------------------------- >Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-12-23 14:32 Message: Logged In: YES user_id=100649 this is currently being adressed in branch moin--main--1.2, together with themeing work and moving to css - most work done by Bastian Blank. some issues might not get fixed immediately as they are not possible with the current parser. but at least, I have already seen some pages validate at W3C validator ;) ---------------------------------------------------------------------- Comment By: Ronny Buchmann (rbla) Date: 2002-03-19 14:47 Message: Logged In: YES user_id=91363 so heres the next patch: moinmoin-xhtml.1.patch issues adressed: * namespace for * elements and attributes only lowercase * empty elements (br, hr, meta, img, input) * empty attributes (nowrap, checked) * all attribute values with quotes i hope to have found all occurences issues not adressed: * no closing tag for

(is there some magic involved? i dont find my way through the code here, but i assume it's easy for you, j?rgen) * printing of xml header and dtd (trivial) ---------------------------------------------------------------------- Comment By: Ronny Buchmann (rbla) Date: 2002-03-19 08:42 Message: Logged In: YES user_id=91363 no, your change to Page.py isnt enough. and i dont think it makes sense to use string.replace to correct typos. (but if your going to actually use url() and link_to(), then i dont have a problem) and if you want xhtml, thats no problem. i'll start making some diffs ---------------------------------------------------------------------- Comment By: J?rgen Hermann (jhermann) Date: 2002-03-18 23:49 Message: Logged In: YES user_id=39128 much easier to fix is at ONE place in url() and link_to() the inline search forms will NOT be fixed, because they are how they are intentionally for any remaining issues you might reopen the bug (do diffs against current CVS), but don't hold your breath; as we approach XHTML compliance and templating, the issue isn't worth any major effort on current code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108482&aid=531617&group_id=8482 From noreply at sourceforge.net Tue Dec 23 05:38:00 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 23 05:38:00 2003 Subject: [Moin-devel] [ moin-Patches-505929 ] Auto merging on saving by many Message-ID: Patches item #505929, was opened at 2002-01-20 03:06 Message generated for change (Comment added) made by thomaswaldmann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=308482&aid=505929&group_id=8482 Category: None Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Hye-Shik Chang (perky) Assigned to: J?rgen Hermann (jhermann) Summary: Auto merging on saving by many Initial Comment: merge them! ;) I think this feature is useful as non-default option. ---------------------------------------------------------------------- >Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-12-23 14:37 Message: Logged In: YES user_id=100649 a similar function has been implemented by Florian Festi in moin--main--1.2 (using python code, not shell). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=308482&aid=505929&group_id=8482 From noreply at sourceforge.net Tue Dec 23 05:40:04 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 23 05:40:04 2003 Subject: [Moin-devel] [ moin-Feature Requests-487605 ] Standards-conformant HTML output Message-ID: Feature Requests item #487605, was opened at 2001-11-30 18:17 Message generated for change (Comment added) made by thomaswaldmann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=487605&group_id=8482 Category: None Group: None >Status: Closed Priority: 5 Submitted By: Christian Reiniger (creinig) Assigned to: Nobody/Anonymous (nobody) Summary: Standards-conformant HTML output Initial Comment: Try browsing moinmoin pages with konqueror or, if you're really masochistic, piping them through http://validator.w3.org/ konqueror especially has big problems with tags without proper Proper XHTML would be *really* cool, but anything rendering correctly (and looking good) will do for the start. I'd send a patch (looking at MoinMoin/formatter/text*.py it doesn't seem too difficult), but I have zero Python knowledge.. ---------------------------------------------------------------------- >Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-12-23 14:39 Message: Logged In: YES user_id=100649 that issue is currently being addressed in development branch moin--main--1.2 (together with themeing and css work) - we already have some stuff validating at w3c, but some issues may remain until the parser gets changed. ---------------------------------------------------------------------- Comment By: Thomas Lorenz (rockfrog) Date: 2003-04-04 12:11 Message: Logged In: YES user_id=648745 This is a really good idea. The non-conformant HTML-output severely limits the usage of own cascading style sheets, e.g. a { text-decoration: underline; } yields some very ugly results in the page preview. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=487605&group_id=8482 From noreply at sourceforge.net Tue Dec 23 05:44:01 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 23 05:44:01 2003 Subject: [Moin-devel] [ moin-Feature Requests-585211 ] parser plugins Message-ID: Feature Requests item #585211, was opened at 2002-07-23 03:55 Message generated for change (Comment added) made by thomaswaldmann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=585211&group_id=8482 Category: None Group: None >Status: Closed Priority: 5 Submitted By: Brian P Templeton (plovre) Assigned to: J?rgen Hermann (jhermann) Summary: parser plugins Initial Comment: Similar to action and macro plugins. This can be done easily by adding plugin-loading code to Page.py (cf. wikiaction.py). ---------------------------------------------------------------------- >Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-12-23 14:42 Message: Logged In: YES user_id=100649 has been fixed in development branch. the plugin loader had to be fixed anyway and now it can load parsers, processors and formatters, too. ---------------------------------------------------------------------- Comment By: J?rgen Hermann (jhermann) Date: 2003-01-29 23:53 Message: Logged In: YES user_id=39128 His (worth-while) point is that plugin support is not orthogonal and currently only implemented for macros and actions, while it should also work with at least parsers and processors (and possibly formatters). plugin == extensions not living in the installed MoinMoin package, but in an instance's data directory ---------------------------------------------------------------------- Comment By: Thomas Waldmann (thomaswaldmann) Date: 2003-01-02 20:11 Message: Logged In: YES user_id=100649 #format python (set a parser for a whole page) {{{!#gnuplot ... }}} (set a processor for some code) If I did not miss anything in the feature request, this should be deleted, because the features are there meanwhile. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=358482&aid=585211&group_id=8482 From ograf at bitart.de Sat Dec 27 00:42:00 2003 From: ograf at bitart.de (Oliver Graf) Date: Sat Dec 27 00:42:00 2003 Subject: [Moin-devel] where is the real HEAD? Message-ID: <20031227084056.GA16063@rz-online.net> Hi! I'm currently reviewing the possibility to get MoinMoin to run as FastCGI. This involves many changes (get rid of sys.std* usage, sys.exit, globals), but I think it's worth the pain. especially those savestdout = sys.stdout sys.stdout = StringIO() somepage.send_page() out = sys.stdout.getvalue() sys.stdout = savestdout constructs hurt my eyes. Now I've read that the moin--main-1.2 branch (whereever it is) should have some of the sys.std* stuff fixed (everything should use Request.write) but I can't see this in the cvs HEAD. There are places where an arch repository is mentioned, but I fail to find directions to it :) Can anybody help? Oliver. From festifn at rupert.informatik.uni-stuttgart.de Sun Dec 28 01:33:04 2003 From: festifn at rupert.informatik.uni-stuttgart.de (Florian Festi) Date: Sun Dec 28 01:33:04 2003 Subject: [Moin-devel] where is the real HEAD? In-Reply-To: <20031227084056.GA16063@rz-online.net> Message-ID: > I'm currently reviewing the possibility to get MoinMoin to run as > FastCGI. This involves many changes (get rid of sys.std* usage, > sys.exit, globals), but I think it's worth the pain. > > especially those > savestdout = sys.stdout > sys.stdout = StringIO() > somepage.send_page() > out = sys.stdout.getvalue() > sys.stdout = savestdout > constructs hurt my eyes. > > Now I've read that the moin--main-1.2 branch (whereever it is) should > have some of the sys.std* stuff fixed (everything should use > Request.write) but I can't see this in the cvs HEAD. As the 1.2 branch runs within twisted, all stdout issues should be solved. I don't know anything about FastCGI, but it should be easy to build derive a new request class and write a small fastcgimain.py. > There are places where an arch repository is mentioned, but I fail to > find directions to it :) The arch repository can be found at http://thinkmo.de/ArchRepository as stated at ["MoinMoin:MoinMoinTodo/Release 1.2"]. It's not that good to find because it was a parallel development to the (long time unreleased) 1.1 and was and in parts still is fast moving and not as stable as the 1.1 branch. cu FlorianFesti From ograf at bitart.de Sun Dec 28 02:24:02 2003 From: ograf at bitart.de (Oliver Graf) Date: Sun Dec 28 02:24:02 2003 Subject: [Moin-devel] where is the real HEAD? In-Reply-To: References: <20031227084056.GA16063@rz-online.net> Message-ID: <20031228102244.GB653@rz-online.net> On Sun, Dec 28, 2003 at 10:32:46AM +0100, Florian Festi wrote: > As the 1.2 branch runs within twisted, all stdout issues should be solved. > I don't know anything about FastCGI, but it should be easy to build derive > a new request class and write a small fastcgimain.py. I don't know much about twisted, but that what I've seen looks like it is something semiliar. So it should do the job... > > There are places where an arch repository is mentioned, but I fail to > > find directions to it :) > > The arch repository can be found at http://thinkmo.de/ArchRepository as > stated at ["MoinMoin:MoinMoinTodo/Release 1.2"]. Ahhhh... yes. Easy too look around :) > It's not that good to find because it was a parallel development to the > (long time unreleased) 1.1 and was and in parts still is fast moving and > not as stable as the 1.1 branch. Yep, that code looks well suited for a FastCGI adaption. I think this should get me a running FastCGI version this evening. Should I send patches to this list? Oliver. From ograf at bitart.de Sun Dec 28 05:38:01 2003 From: ograf at bitart.de (Oliver Graf) Date: Sun Dec 28 05:38:01 2003 Subject: [Moin-devel] where is the real HEAD? In-Reply-To: <20031228102244.GB653@rz-online.net> References: <20031227084056.GA16063@rz-online.net> <20031228102244.GB653@rz-online.net> Message-ID: <20031228133723.GA14522@rz-online.net> On Sun, Dec 28, 2003 at 11:22:45AM +0100, Oliver Graf wrote: > Yep, that code looks well suited for a FastCGI adaption. I think this > should get me a running FastCGI version this evening. Should I send patches > to this list? Ok, I've got a multi-threaded FastCGI MoinMoin running, but I don't know if this would be stable, cause there are lot of places where globals are used. So it would be better to swicth to a single threaded FastCGI version. As I told before, I don't have any knowledge what twisted ist (sounds a lot like Zope). Does anybody know if twisted is multi-threaded? If yes, and MoinMoin makes no problems with it's globals, it should also be save to run a multi-threaded FastCGI MoinMoin... (normally a global dict as in user.py should be thread-save by pythons implementation -- but a mutex would be normally the right thing to employ in such places...) I made changes to request.py (new RequestFastCGI), added a fcgmain which handles FastCGI requests and starts the fcg main loop, added a threaded FastCGI library (thfcgi.py) and a main.fcg. Oliver. From festifn at rupert.informatik.uni-stuttgart.de Sun Dec 28 06:03:02 2003 From: festifn at rupert.informatik.uni-stuttgart.de (Florian Festi) Date: Sun Dec 28 06:03:02 2003 Subject: [Moin-devel] where is the real HEAD? In-Reply-To: <20031228133723.GA14522@rz-online.net> Message-ID: On Sun, 28 Dec 2003, Oliver Graf wrote: > On Sun, Dec 28, 2003 at 11:22:45AM +0100, Oliver Graf wrote: > > Yep, that code looks well suited for a FastCGI adaption. I think this > > should get me a running FastCGI version this evening. Should I send patches > > to this list? Perhaps it's better to create a page about your changes in the MOinMoin wiki and attache the patch there (but that's more or less my personal taste). > Ok, I've got a multi-threaded FastCGI MoinMoin running, but I don't > know if this would be stable, cause there are lot of places where > globals are used. So it would be better to swicth to a single threaded > FastCGI version. > > As I told before, I don't have any knowledge what twisted ist (sounds > a lot like Zope). Does anybody know if twisted is multi-threaded? If > yes, and MoinMoin makes no problems with it's globals, it should also > be save to run a multi-threaded FastCGI MoinMoin... (normally a global > dict as in user.py should be thread-save by pythons implementation -- > but a mutex would be normally the right thing to employ in such > places...) twisted is a python frame work containing lots of things. For details you should ask Thomas Waldmann who developed the twisted support. AFAIK MoinMoin runs multi threaded with in twisted although twisted prefers single threaded applications. > I made changes to request.py (new RequestFastCGI), added a fcgmain > which handles FastCGI requests and starts the fcg main loop, added a > threaded FastCGI library (thfcgi.py) and a main.fcg. cool. cu Florian Festi From ograf at rz-online.net Sun Dec 28 10:18:01 2003 From: ograf at rz-online.net (Oliver Graf) Date: Sun Dec 28 10:18:01 2003 Subject: [Moin-devel] where is the real HEAD? In-Reply-To: References: <20031228133723.GA14522@rz-online.net> Message-ID: <20031228181716.GA17032@rz-online.net> On Sun, Dec 28, 2003 at 03:02:41PM +0100, Florian Festi wrote: > > As I told before, I don't have any knowledge what twisted ist (sounds > > a lot like Zope). Does anybody know if twisted is multi-threaded? If > > yes, and MoinMoin makes no problems with it's globals, it should also > > be save to run a multi-threaded FastCGI MoinMoin... (normally a global > > dict as in user.py should be thread-save by pythons implementation -- > > but a mutex would be normally the right thing to employ in such > > places...) > > twisted is a python frame work containing lots of things. For details you > should ask Thomas Waldmann who developed the twisted support. AFAIK > MoinMoin runs multi threaded with in twisted although twisted prefers > single threaded applications. I must correct myself. It won't run single threaded because of those sys.exit calls scattered around in MoinMoin which will simply kill a single threaded FastCGI process. In a mutlithreaded environment this simply exits the current thread... I wonder how this is solved within twisted... but perhaps Thomas reads this list, too, and can give me a hint to this... Oliver. From ograf at bitart.de Sun Dec 28 11:09:04 2003 From: ograf at bitart.de (Oliver Graf) Date: Sun Dec 28 11:09:04 2003 Subject: [Moin-devel] [PATCH] run MoinMoin as FastCGI Message-ID: <20031228190751.GA10741@rz-online.net> Hi! I've added a patch to ["MoinMoin:MoinMoinPatch"] (is this the way to write wiki links in mails?) which adds a FastCGI ( http://fastcgi.com/ ) mode to MoinMoin. Why FastCGI? FastCGI is a method to run a script in an endless loop and answer requests send to it by the http server. This saves initialization time and allows to cache stuff in memory. FastCGI can be run trough suexec wrapper and run with user rights instead of server rights. And if you have a bunch of users on one server, this might be a tough issue. There are still some sharp points: - it will only run multi-threaded, cause MoinMoin has lots of sys.exit calls in it which will kill the single-threaded fastcgi process (remember: it should not stop, cause we want to start it only one time) -> get rid of those sys.exit calls, us return values and ifs. - multi-threaded is nice but also has problems, especially with those globals. And there are some in MoinMoin, as a quick grep shows. This might not result in errors, but it could... -> add thread locks to code which accesses globals. - os.environ is used. this is bad for a cgi that can handle multiple concurrent requests, cause each request has it's own environment (at least it should have...) -> add environ to Request container and access environ only through this interface (RequestFastCGI does do this for internal use) To whoever has twisted knowledge: How does twisted handle those points? Is twisted multi-threaded? Oliver. -------------- next part -------------- --- moin--main--1.2--20031228-0700/wiki/cgi-bin/moin.fcg.orig 2003-12-28 14:42:12.000000000 +0100 +++ moin--main--1.2--20031228-0700/wiki/cgi-bin/moin.fcg 2003-12-28 19:33:00.000000000 +0100 @@ -0,0 +1,20 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- +""" + MoinMoin - FastCGI Driver Script + + Copyright (c) 2003 by Oliver Graf + All rights reserved, see COPYING for details. + + $Id$ +""" + +#import sys +#sys.path[0:0]=['/var/www/moin-main/lib/python', +# '/var/www/moin-main/wiki'] + +# +# no test mode, cause wikitest those not use Request container! +# +from MoinMoin import fcgimain +fcgimain.run() --- moin--main--1.2--20031228-0700/MoinMoin/util/thfcgi.py.orig 2003-12-28 14:07:37.000000000 +0100 +++ moin--main--1.2--20031228-0700/MoinMoin/util/thfcgi.py 2003-12-28 19:10:21.000000000 +0100 @@ -0,0 +1,521 @@ +# thfcgi.py - FastCGI communication with thread support +# +# Copyright Peter ?strand 2001 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# TODO: +# +# Compare compare the number of bytes received on FCGI_STDIN with +# CONTENT_LENGTH and abort the update if the two numbers are not equal. +# + +import os +import sys +import select +import string +import socket +import errno +import cgi +import thread +from cStringIO import StringIO +import struct + +# Maximum number of requests that can be handled +FCGI_MAX_REQS = 50 +FCGI_MAX_CONNS = 50 +FCGI_VERSION_1 = 1 +# Can this application multiplex connections? +FCGI_MPXS_CONNS = 0 + +# Record types +FCGI_BEGIN_REQUEST = 1 +FCGI_ABORT_REQUEST = 2 +FCGI_END_REQUEST = 3 +FCGI_PARAMS = 4 +FCGI_STDIN = 5 +FCGI_STDOUT = 6 +FCGI_STDERR = 7 +FCGI_DATA = 8 +FCGI_GET_VALUES = 9 +FCGI_GET_VALUES_RESULT = 10 +FCGI_UNKNOWN_TYPE = 11 +FCGI_MAXTYPE = FCGI_UNKNOWN_TYPE + +# Types of management records +KNOWN_MANAGEMENT_TYPES = [FCGI_GET_VALUES] + +FCGI_NULL_REQUEST_ID = 0 + +# Masks for flags component of FCGI_BEGIN_REQUEST +FCGI_KEEP_CONN = 1 + +# Values for role component of FCGI_BEGIN_REQUEST +FCGI_RESPONDER = 1 +FCGI_AUTHORIZER = 2 +FCGI_FILTER = 3 + +# Values for protocolStatus component of FCGI_END_REQUEST +FCGI_REQUEST_COMPLETE = 0 # Request completed ok +FCGI_CANT_MPX_CONN = 1 # This app cannot multiplex +FCGI_OVERLOADED = 2 # Too busy +FCGI_UNKNOWN_ROLE = 3 # Role value not known + +# Struct format types +FCGI_BeginRequestBody = "!HB5x" +FCGI_Record_header = "!BBHHBx" +FCGI_UnknownTypeBody = "!B7x" +FCGI_EndRequestBody = "!IB3x" + +class Record: + """Class representing FastCGI records""" + def __init__(self): + self.version = FCGI_VERSION_1 + self.rec_type = FCGI_UNKNOWN_TYPE + self.req_id = FCGI_NULL_REQUEST_ID + self.content = "" + + # Only in FCGI_BEGIN_REQUEST + self.role = None + self.flags = None + self.keep_conn = 0 + + # Only in FCGI_UNKNOWN_TYPE + self.unknownType = None + + # Only in FCGI_END_REQUEST + self.appStatus = None + self.protocolStatus = None + + def read_pair(self, data, pos): + namelen = struct.unpack("!B", data[pos])[0] + if namelen & 128: + # 4-byte name length + namelen = struct.unpack("!I", data[pos:pos+4])[0] + pos += 4 + else: + pos += 1 + + valuelen = struct.unpack("!B", data[pos])[0] + if valuelen & 128: + # 4-byte value length + valuelen = struct.unpack("!I", data[pos:pos+4])[0] + pos += 4 + else: + pos += 1 + + name = data[pos:pos+namelen] + pos += namelen + value = data[pos:pos+valuelen] + pos += valuelen + + return (name, value, pos) + + def write_pair(self, name, value): + namelen = len(name) + if namelen < 128: + data = struct.pack("!B", namelen) + else: + # 4-byte name length + data = struct.pack("!I", namelen) + + valuelen = len(value) + if valuelen < 128: + data += struct.pack("!B", value) + else: + # 4-byte value length + data += struct.pack("!I", value) + + return data + name + value + + def readRecord(self, sock): + data = sock.recv(8) + if not data: + # No data recieved. This means EOF. + return None + + fields = struct.unpack(FCGI_Record_header, data) + (self.version, self.rec_type, self.req_id, + contentLength, paddingLength) = fields + + self.content = "" + while len(self.content) < contentLength: + data = sock.recv(contentLength - len(self.content)) + self.content = self.content + data + if paddingLength != 0: + sock.recv(paddingLength) + + # Parse the content information + if self.rec_type == FCGI_BEGIN_REQUEST: + (self.role, self.flags) = struct.unpack(FCGI_BeginRequestBody, + self.content) + self.keep_conn = self.flags & FCGI_KEEP_CONN + + elif self.rec_type == FCGI_UNKNOWN_TYPE: + self.unknownType = struct.unpack(FCGI_UnknownTypeBody, self.content) + + elif self.rec_type == FCGI_GET_VALUES or self.rec_type == FCGI_PARAMS: + self.values = {} + pos = 0 + while pos < len(self.content): + name, value, pos = self.read_pair(self.content, pos) + self.values[name] = value + elif self.rec_type == FCGI_END_REQUEST: + (self.appStatus, + self.protocolStatus) = struct.unpack(FCGI_EndRequestBody, + self.content) + + return 1 + + def writeRecord(self, sock): + content = self.content + if self.rec_type == FCGI_BEGIN_REQUEST: + content = struct.pack(FCGI_BeginRequestBody, self.role, self.flags) + + elif self.rec_type == FCGI_UNKNOWN_TYPE: + content = struct.pack(FCGI_UnknownTypeBody, self.unknownType) + + elif self.rec_type == FCGI_GET_VALUES or self.rec_type == FCGI_PARAMS: + content = "" + for i in self.values.keys(): + content = content + self.write_pair(i, self.values[i]) + + elif self.rec_type == FCGI_END_REQUEST: + content = struct.pack(FCGI_EndRequestBody, self.appStatus, + self.protocolStatus) + + # Align to 8-byte boundary + clen = len(content) + padlen = ((clen + 7) & 0xfff8) - clen + + hdr = struct.pack(FCGI_Record_header, self.version, self.rec_type, + self.req_id, clen, padlen) + + try: + sock.send(hdr + content + padlen*"\x00") + except socket.error: + # Write error, probably broken pipe. Exit thread. + thread.exit() + + +class Request: + """A request, corresponding to an accept():ed connection and + a FCGI request. + """ + def __init__(self, conn, req_handler, multi=1): + self.conn = conn + self.req_handler = req_handler + self.multi = multi + + self.keep_conn = 0 + self.req_id = None + + # Input + self.env = {} + self.env_complete = 0 + self.stdin = StringIO() + self.stdin_complete = 0 + self.data = StringIO() + self.data_complete = 0 + + # Output + self.out = StringIO() + self.err = StringIO() + + self.have_finished = 0 + + def run(self): + while 1: + if self.conn.fileno() < 1: + # Connection lost + return + + select.select([self.conn], [], []) + rec = Record() + if rec.readRecord(self.conn): + self._handle_record(rec) + else: + # EOF, connection closed. Break loop, end thread. + return + + def getFieldStorage(self): + self.stdin.reset() + return cgi.FieldStorage(fp=self.stdin, environ=self.env, + keep_blank_values=1) + + def _flush(self, stream): + stream.reset() + + rec = Record() + rec.rec_type = FCGI_STDOUT + rec.req_id = self.req_id + data = stream.read() + + if not data: + # Writing zero bytes would mean stream termination + return + + while data: + chunk, data = self.getNextChunk(data) + rec.content = chunk + rec.writeRecord(self.conn) + # Truncate + stream.reset() + stream.truncate() + + def flush_out(self): + self._flush(self.out) + + def flush_err(self): + self._flush(self.err) + + def finish(self, status=0): + if self.have_finished: + return + + self.have_finished = 1 + + # stderr + self.err.reset() + rec = Record() + rec.rec_type = FCGI_STDERR + rec.req_id = self.req_id + data = self.err.read() + while data: + chunk, data = self.getNextChunk(data) + rec.content = chunk + rec.writeRecord(self.conn) + rec.content = "" + rec.writeRecord(self.conn) # Terminate stream + + # stdout + self.out.reset() + rec = Record() + rec.rec_type = FCGI_STDOUT + rec.req_id = self.req_id + data = self.out.read() + while data: + chunk, data = self.getNextChunk(data) + rec.content = chunk + rec.writeRecord(self.conn) + rec.content = "" + rec.writeRecord(self.conn) # Terminate stream + + # end request + rec = Record() + rec.rec_type = FCGI_END_REQUEST + rec.req_id = self.req_id + rec.appStatus = status + rec.protocolStatus = FCGI_REQUEST_COMPLETE + rec.writeRecord(self.conn) + if not self.keep_conn: + self.conn.close() + if self.multi: + thread.exit() + + # + # Record handlers + # + def _handle_record(self, rec): + """Handle record""" + if rec.req_id == FCGI_NULL_REQUEST_ID: + # Management record + self._handle_man_record(rec) + else: + # Application record + self._handle_app_record(rec) + + def _handle_man_record(self, rec): + """Handle management record""" + rec_type = rec.rec_type + if rec_type in KNOWN_MANAGEMENT_TYPES: + self._handle_known_man_types(rec) + else: + # It's a management record of an unknown + # type. Signal the error. + rec = Record() + rec.rec_type = FCGI_UNKNOWN_TYPE + rec.unknownType = rec_type + rec.writeRecord(self.conn) + + def _handle_known_man_types(self, rec): + if rec.rec_type == FCGI_GET_VALUES: + reply_rec = Record() + reply_rec.rec_type = FCGI_GET_VALUES_RESULT + + params = {'FCGI_MAX_CONNS' : FCGI_MAX_CONNS, + 'FCGI_MAX_REQS' : FCGI_MAX_REQS, + 'FCGI_MPXS_CONNS' : FCGI_MPXS_CONNS} + + for name in rec.values.keys(): + if params.has_key(name): + # We known this value, include in reply + reply_rec.values[name] = params[name] + + rec.writeRecord(self.conn) + + def _handle_app_record(self, rec): + if rec.rec_type == FCGI_BEGIN_REQUEST: + # Discrete + self._handle_begin_request(rec) + return + elif rec.req_id != self.req_id: + #print >> sys.stderr, "Recieved unknown request ID", rec.req_id + # Ignore requests that aren't active + return + if rec.rec_type == FCGI_ABORT_REQUEST: + # Discrete + rec.rec_type = FCGI_END_REQUEST + rec.protocolStatus = FCGI_REQUEST_COMPLETE + rec.appStatus = 0 + rec.writeRecord(self.conn) + return + elif rec.rec_type == FCGI_PARAMS: + # Stream + self._handle_params(rec) + elif rec.rec_type == FCGI_STDIN: + # Stream + self._handle_stdin(rec) + elif rec.rec_type == FCGI_DATA: + # Stream + self._handle_data(rec) + else: + # Should never happen. + #print >> sys.stderr, "Recieved unknown FCGI record type", rec.rec_type + pass + + if self.env_complete and self.stdin_complete: + # Call application request handler. + # The arguments sent to the request handler is: + # self: us. + # req: The request. + # env: The request environment + # form: FieldStorage. + self.req_handler(self, self.env, self.getFieldStorage()) + + def _handle_begin_request(self, rec): + if rec.role != FCGI_RESPONDER: + # Unknown role, signal error. + rec.rec_type = FCGI_END_REQUEST + rec.appStatus = 0 + rec.protocolStatus = FCGI_UNKNOWN_ROLE + rec.writeRecord(self.conn) + return + + self.req_id = rec.req_id + self.keep_conn = rec.keep_conn + + def _handle_params(self, rec): + if self.env_complete: + # Should not happen + #print >> sys.stderr, "Recieved FCGI_PARAMS more than once" + return + + if not rec.content: + self.env_complete = 1 + + # Add all vars to our environment + self.env.update(rec.values) + + def _handle_stdin(self, rec): + if self.stdin_complete: + # Should not happen + #print >> sys.stderr, "Recieved FCGI_STDIN more than once" + return + + if not rec.content: + self.stdin_complete = 1 + + self.stdin.write(rec.content) + + def _handle_data(self, rec): + if self.data_complete: + # Should not happen + #print >> sys.stderr, "Recieved FCGI_DATA more than once" + return + + if not rec.content: + self.data_complete = 1 + + self.data.write(rec.content) + + def getNextChunk(self, data): + chunk = data[:8192] + data = data[8192:] + return chunk, data + + +class THFCGI: + def __init__(self, req_handler, fd=sys.stdin): + self.req_handler = req_handler + self.fd = fd + self.multi = 1 + self._make_socket() + + def run(self): + """Wait & serve. Calls request handler in new + thread on every request. + """ + self.sock.listen(5) + + while 1: + (conn, addr) = self.sock.accept() + thread.start_new_thread(self.accept_handler, (conn, addr)) + + def accept_handler(self, conn, addr): + self._check_good_addrs(addr) + req = Request(conn, self.req_handler, self.multi) + req.run() + + def _make_socket(self): + """Create socket and verify FCGI environment""" + try: + s = socket.fromfd(self.fd.fileno(), socket.AF_INET, + socket.SOCK_STREAM) + s.getpeername() + except socket.error, (err, errmsg): + if err != errno.ENOTCONN: + raise "No FastCGI environment" + + self.sock = s + + def _check_good_addrs(self, addr): + # Apaches mod_fastcgi seems not to use FCGI_WEB_SERVER_ADDRS. + if os.environ.has_key('FCGI_WEB_SERVER_ADDRS'): + good_addrs = string.split(os.environ['FCGI_WEB_SERVER_ADDRS'], ',') + good_addrs = map(string.strip, good_addrs) # Remove whitespace + else: + good_addrs = None + + # Check if the connection is from a legal address + if good_addrs != None and addr not in good_addrs: + raise "Connection from invalid server!" + + +class unTHFCGI(THFCGI): + """ un-threaded version by Oliver Graf """ + + def __init__(self, req_handler, fd=sys.stdin): + THFCGI.__init__(self, req_handler, fd) + self.mutli = 0 + + def run(self): + """Wait & serve. Calls request handler for every request (blocking) +""" + self.sock.listen(5) + + while 1: + (conn, addr) = self.sock.accept() + self.accept_handler(conn, addr) + --- moin--main--1.2--20031228-0700/MoinMoin/request.py.orig 2003-12-28 14:01:56.000000000 +0100 +++ moin--main--1.2--20031228-0700/MoinMoin/request.py 2003-12-28 14:27:21.000000000 +0100 @@ -1046,3 +1046,126 @@ ]) +# FastCGI ----------------------------------------------------------- + +class RequestFastCGI(RequestBase): + """ specialized on FastCGI requests """ + + def __init__(self, fcgRequest, env, form, properties={}): + self.fcgreq = fcgRequest + self.fcgenv = env + self.fcgform = form + self.http_accept_language = self.fcgenv.get('HTTP_ACCEPT_LANGUAGE') + self.server_name = self.fcgenv.get('SERVER_NAME', 'localhost') + self.server_port = self.fcgenv.get('SERVER_PORT', '80') + self.http_host = self.fcgenv.get('HTTP_HOST') + self.http_referer = self.fcgenv.get('HTTP_REFERER') + self.saved_cookie = self.fcgenv.get('HTTP_COOKIE', '') + self.script_name = self.fcgenv.get('SCRIPT_NAME', '') + self.path_info = self.fcgenv.get('PATH_INFO', '') + self.query_string = self.fcgenv.get('QUERY_STRING', '') + self.request_method = self.fcgenv.get('REQUEST_METHOD', None) + self.remote_addr = self.fcgenv.get('REMOTE_ADDR', '') + self.http_user_agent = self.fcgenv.get('HTTP_USER_AGENT', '') + RequestBase.__init__(self, properties) + + def setup_args(self): + args = {} + for key in self.fcgform.keys(): + values = self.fcgform[key] + if not isinstance(values, types.ListType): + values = [values] + fixedResult = [] + for i in values: + if isinstance(i, cgi.MiniFieldStorage): + i = i.value + fixedResult.append(i) + + args[key] = fixedResult + return args + + def read(self): + """ Read from input stream. + """ + return self.fcgreq.stdin.read() + + def write(self, *data): + """ Write to output stream. + """ + self.fcgreq.out.write("".join(data)) + + def flush(self): + self.fcgreq.flush_out() + + def finish(self): + self.fcgreq.finish() + + def open_logs(self): + return + + + ############################################################################# + ### Accessors + ############################################################################# + + def isSSL(self): + """ Return true if we are on a SSL (https) connection. """ + return self.fcgenv.get('SSL_PROTOCOL', '') != '' or \ + self.fcgenv.get('SSL_PROTOCOL_VERSION', '') != '' or \ + self.fcgenv.get('HTTPS', '') == 'on' + + + def getScriptname(self): + """ Return the scriptname part of the URL ('/path/to/my.cgi'). """ + name = self.script_name + if name == '/': + return '' + return name + + + def getPathinfo(self): + """ Return the remaining part of the URL. """ + pathinfo = self.path_info + + # Fix for bug in IIS/4.0 + if os.name == 'nt': + scriptname = getScriptname() + if pathinfo.startswith(scriptname): + pathinfo = pathinfo[len(scriptname):] + + return pathinfo + + + ############################################################################# + ### Headers + ############################################################################# + + def setHttpHeader(self, header): + self.user_headers.append(header) + + + def http_headers(self, more_headers=[]): + if self.sent_headers: + #self.write("Headers already sent!!!\n") + return + self.sent_headers = 1 + have_ct = 0 + + # send http headers + for header in more_headers: + if header.lower().startswith("content-type:"): have_ct = 1 + self.write(header, '\r\n') + + for header in self.user_headers: + if header.lower().startswith("content-type:"): have_ct = 1 + self.write(header, '\r\n') + + if not have_ct: + self.write("Content-type: text/html;charset=%s\r\n" % config.charset) + + self.write('\r\n') + + #from pprint import pformat + #sys.stderr.write(pformat(more_headers)) + #sys.stderr.write(pformat(self.user_headers)) + --- moin--main--1.2--20031228-0700/MoinMoin/fcgimain.py.orig 2003-12-28 14:01:44.000000000 +0100 +++ moin--main--1.2--20031228-0700/MoinMoin/fcgimain.py 2003-12-28 19:37:54.000000000 +0100 @@ -0,0 +1,24 @@ +# -*- coding: iso-8859-1 -*- +""" + MoinMoin - Main FastCGI Module + + Copyright (c) 2003 by Oliver Graf + All rights reserved, see COPYING for details. + + $Id$ +""" + +############################################################################# +### Main code +############################################################################# + +from MoinMoin.request import RequestFastCGI +from MoinMoin.util import thfcgi + +def handle_request(req, env, form): + request = RequestFastCGI(req,env,form) + request.run() + +def run(properties={}): + fcg = thfcgi.THFCGI(handle_request) + fcg.run() From tw-public at gmx.de Mon Dec 29 10:27:01 2003 From: tw-public at gmx.de (Thomas Waldmann) Date: Mon Dec 29 10:27:01 2003 Subject: [Moin-devel] where is the real HEAD? References: <20031227084056.GA16063@rz-online.net> Message-ID: <3FF071C6.6030705@gmx.de> Hi Oliver, > Now I've read that the moin--main-1.2 branch (whereever it is) should > have some of the sys.std* stuff fixed (everything should use > Request.write) but I can't see this in the cvs HEAD. I set up a GNU arch (tla) repository at http://arch.thinkmo.de due to the problems with CVS: * no real support for development on branches * SF CVS often out of sync or broken or slow Before release 1.1, I often told people "do not use 1.0, use CVS, that is much better and runs very stable". After release 1.1, we did quite heavy merges of all that stuff that accumulated in 2002 - in tla branches, in patches, etc. - that was done in tla branch moin--main--1.2, using the great branching / merging support of tla. After that, we also did HTML / CSS / i18n cleanups, which had broken moin's appearance severely, but had to be done. Currently the code there is recovering from these heavy changes and can be committed to SF CVS soon, although a complete switch to arch might be better, IMHO. > There are places where an arch repository is mentioned, but I fail to > find directions to it :) See http://arch.thinkmo.de. greetings, Thomas