Jump to content

Recommended Posts

Posted

Hey I'm Sagnik! I've a problem on Python Scripts. I had a Python Script, when I'm opening the file in the browser, the script is showing as plain text instead of running. I've added the apache handler "cgi-script" as extentions ".cgi .pl .py .perl .ppl" and I've changed the permition of the script to "0755". But it not works. Please help me as soon as possible.

Posted

Sir, it doesn't works. When I've added the code to .htaccess file then when I'm opening any of my file, then I'm getting a 500 Internal Server Error.

 

Please help me.

Posted

Please provide us the link to the Python script and also the script if possible so that we can identify you the error in your Python script.

Posted

Python script is not

working when

openin .py file I'm

getting 500 Internal

Server Error. I've set the

file permition of the

python script to "0755"

and I've added the code

"AddHandler cgi-

script .py .cgi .pl .perl" to

the .htaccess file and

also I've added the

handler "cgi-script" as

".py .cgi .pl .perl" from

cPanel's "Apache

Handler" section. Yet,

I'm getting the "500

Internal Server Error".

Please Help Me. Also I've

posted this problem on

the HelioNet's "General

Discussion" section.

Posted

You can post the python script in the post too, or upload it to online services like pastebin, etc.

 

Also check in your python script that you have the shebang line

#!/usr/bin/python

Also, the first line should be always

print("Content-Type: text/html\n\n");

 

 

Posted

here is my python code:

#!/usr/bin/python

print("Content-Type:

text/html\n\n");name=raw_input('Enter

your name:')

print ("Hi %s, Let us be

friends!" % name);

so what is the problem?

Posted

Thank you sir. My script is now running successfully.

Posted

Ok sir, I've problem on ASP.NET. I've recently posted a topic on it. Please check this.

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