[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:

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

Windows System Environment Variables:
----------------------------------------------------------------------
PYTHONPATH=.\;C:\Python22;C:\Python22\Lib;C:\Python22\DLLs
PYTHONHOME=C:\Python22


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

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

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

Windows System Environment Variables:
----------------------------------------------------------------------
PYTHONPATH=.\;D:\Tools\Python21;C:\Tools\Python21\Lib;C:\Python21\DLLs
PYTHONHOME=D:\Tools\Python21


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.

Regards,

Hans


-----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 ??


Hi...
I get thiserror:
Error:  Premature end of script headers: moin.bat 
!!??
when I want to see the url: http:\\127.0.0.1\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:
"d:\Tools\Moin\mywiki"
------------------------
@echo off 
set PYTHONPATH=d:\Tools\Moin
D: 
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
http://sbc.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf
_______________________________________________
Moin-user mailing list
Moin-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/moin-user




More information about the Moin-user mailing list