terhaarb Posted June 15, 2017 Share Posted June 15, 2017 (edited) I would like some help to get a python script to work. I am familiar with python and running it on a web server (local Apache with minimum configurations). I have scoured most of the wiki and forums for help. The most straight-forward post I found (a 'hello world') is here:http://www.helionet.org/index/topic/21335-deploying-python-first-timer-here/?hl=python. I have followed that post with a new file edited through cPanel using us-ascii format placed in the cg-bin folder. I changed the permissions to 777 (I realize 755 should be sufficient). I added .py to the Apache Handlers. I edited the .py file to use no semi-colon and with ';' as in the example. I even added a .htaccess file with only the content suggested in the forum post, even though I believe I shouldn't need it. Through all my editing and configuration searching in forums and the wiki I still end up with a 500 error (which could be many things - from the forum searches). I've attached a screenshot of the file. I'm sure there's something stupid/simple I've overlooked. Best regards, BT Edited June 15, 2017 by terhaarb Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 15, 2017 Share Posted June 15, 2017 What shebang are you using? Quote Link to comment Share on other sites More sharing options...
terhaarb Posted June 15, 2017 Author Share Posted June 15, 2017 #!/usr/bin/python Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 16, 2017 Share Posted June 16, 2017 http://terhaarb.heliohost.org/cgi-bin/python_firstrun.py The only thing that was wrong is I changed the permissions from 777 to 755. Quote Link to comment Share on other sites More sharing options...
terhaarb Posted June 16, 2017 Author Share Posted June 16, 2017 Awesome, it's working now!! Thank you very much!! I figured it would be something simple I overlooked. I sincerely thought 777 would cover that. Quote Link to comment Share on other sites More sharing options...
Luigi123 Posted June 17, 2017 Share Posted June 17, 2017 Moved to Customer Service. Quote Link to comment Share on other sites More sharing options...
Krydos Posted June 28, 2017 Share Posted June 28, 2017 @lefterov, your topic has been split to http://www.helionet.org/index/topic/28626-python-cgi/ 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.