[Moin-user] Error: Premature end of script headers: moin.bat ??

Yandle, Hans Hans.Yandle at cingular.com
Wed Jul 10 09:46:17 EDT 2002

I believe I have encountered a similar situation, however with the use of
Python 2.2 instead of your 2.1. I had to append the moin environment path to
the pythonpath environment variable. The Apache log files helped me
determine what the problem was. The following is my working moin.bat file:

@echo off
set PYTHONPATH=%PYTHONPATH%;C:\Moin\Lib\site-packages
cd \Moin\mywiki
C:\Python22\python.exe moin.cgi

Windows System Environment Variables:

In your case using D:\Tools\Python21 and D:\Tools\Moin\mywiki, the above
would be:

@echo off
set PYTHONPATH=%PYTHONPATH%;D:\Tools\Moin\Lib\site-packages

cd \Tools\Moin\mywiki
D:\Tools\Python21\python.exe moin.cgi

Windows System Environment Variables:

I did not need to add the "SetEnv PYTHONPATH "d:\tools\moin" line to
httpd.conf because between my system environment and moin.bat file the paths
were known. Remember, a reboot may be required to allow your system services
to use the new system environment (you could just stop/restart all of them
but rebooting is so much easier).

If this does not help, try including the associated apache logs.



-----Original Message-----
From: Jose Rivera [mailto:jriveramerla at yahoo.com]
Sent: Tuesday, July 09, 2002 2:45 PM
To: moin-user at lists.sourceforge.net
Subject: [Moin-user] Error: Premature end of script headers: moin.bat ??

I get thiserror:
Error:  Premature end of script headers: moin.bat 
when I want to see the url: http:\\\mywiki

What it's wrong? Thanks for your help... in advance.

I'm on WinNT, Apache, Python 2.1 and this scenario:

I installed mywiki on "d:\tools\moin\mywiki"
Python -> d:\tools\python21\python.exe
Apache -> d:\tools\ApacheGroup\Apache2

This is the configiuraction files:

httpd.conf (last 3 lines):
Location: "d:\Tools\Apache Group\Apache2\conf"
SetEnv PYTHONPATH "d:\tools\moin" 
Alias /mywiki/ "d:\Tools\Moin\share\moin\htdocs\" 
ScriptAlias /mywiki "d:\Tools\Moin\mywiki\moin.bat"

Moin.BAT (ALL the Lines) Location:
@echo off 
set PYTHONPATH=d:\Tools\Moin
cd \Tools\Moin\mywiki 
d:\Tools\Python21\python.exe moin.cgi 

Moin_Config.py (located at:d:\Tools\Moin\mywiki)
... A lot of lines...

Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free

This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
Moin-user mailing list
Moin-user at lists.sourceforge.net

More information about the Moin-user mailing list