To175 Posted January 4, 2015 Posted January 4, 2015 Hi, help please ... #!/usr/bin/python print "Bienvenue sur mon site web !"or #!/usr/bin/python print("Bienvenue sur mon site web !") Give : ERREUR 500 http://mecraft.fr/cgi-bin/hello.py
wolstech Posted January 5, 2015 Posted January 5, 2015 Did you set the file's permissions to 755? Python requires that to run here. Perhaps this topic might be helpful: http://www.helionet.org/index/topic/19972-using-python-for-cgi
To175 Posted January 6, 2015 Author Posted January 6, 2015 Yes, I did.http://mecraft.fr/cgi-bin/hello.py
sagnik Posted January 9, 2015 Posted January 9, 2015 #!/usr/bin/python print "Bienvenue sur mon site web !" The main problem on your code is that, you haven't declared the content type and the semi-colon(; ) is missing in the content. Please add the following line exactly after the shebang line: print "Content-type: text/plain\n\n"; After adding the above line and ";" to the content line, your code will look like: #!/usr/bin/python print "Content-type: text/plain\n\n"; print "Bienvenue sur mon site web !"; I've copied your code to my website and your code worked fine after adding print "Content-type: text/plain\n\n"; line. Take a look at www.sagnikganguly.ga/cgi-bin/to175.py
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now