Jump to content

Python scripts doesn't work


Karak

Recommended Posts

I try to use python without success - It always give me 500 internal error.

 

This is test script:

http://karak.heliohost.org/cgi-bin/test.cgi

 

It is just:

#!/usr/bin/python

print "Content-Type: text/plain;charset=utf-8"

print "Hello World"

 

What I have to do for it to work??

 

I already tried adding

 

AddHandler python-program .py

 

to .htaccess file in cgi-bin folder and using Apache Handler option in cPanel,

 

If I set up account like that - .py files are treated as text files.

 

I also tried adding

"Options +ExecCGI

AddHandler cgi-script .py"

as suggested on several sites, but then it only shows internal error 500.

 

I really want Python to work:( Please help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...