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

Here is the link of my python script:

http://www.sgservices.tk/test.py

I'm sorry, I couldn't attach the script because, the uploader field was hidden. Please fix my problem.

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...