Hi everyone,

I am trying to get Python working on XAMPP. I'm running Windows Vista, XAMPP version 1.7.1., PHP is working without any problems.

I followed the instructions from here:

http://www.macouno.com/2010/03/17/getti ... -on-xampp/

I did everything the same, restarted Apache service, rebooted the PC but still I get the following error:

Server error!

    The server encountered an internal error and was unable to complete your request.

    Error message:
    malformed header from script. Bad header=Works!: index.py

    If you think this is a server error, please contact the webmaster.
    Error 500
    localhost
    11/20/10 12:19:37
    Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9

Btw, I wanted to install mod_python for Windows, but seems that the download section is not working (at least for the last 7 days):
http://www.modpython.org/

Any idea how to get this working?

Thanks a lot in any case

BB

Found the answer:

This line should be printed before anything else:

print "Content-Type: text/html\n"

Cheers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.