To175 Posted January 4, 2015 Share 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 Quote Link to comment Share on other sites More sharing options...
wolstech Posted January 5, 2015 Share 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 Quote Link to comment Share on other sites More sharing options...
To175 Posted January 6, 2015 Author Share Posted January 6, 2015 Yes, I did.http://mecraft.fr/cgi-bin/hello.py Quote Link to comment Share on other sites More sharing options...
sagnik Posted January 9, 2015 Share 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 Quote Link to comment Share on other sites More sharing options...
To175 Posted January 9, 2015 Author Share Posted January 9, 2015 Thanks you very much ! Quote Link to comment Share on other sites More sharing options...
sagnik Posted January 10, 2015 Share Posted January 10, 2015 You are Welcome!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.