ah-blabla
New Member
- Messages
- 375
- Reaction score
- 7
- Points
- 0
X10Hosting is one of the few free hosting providers allowing Python. Here you will learn how to run python scripts on your website:
1: Make sure your python script has the following as the very first line:
2. Upload the file (ftp), and make sure it is set as executable: (varies depending on software)
3. Make sure the .htaccess file is set up correctly to allow python to run:
If you placed the script in the cgi-bin directory the script will run directly, otherwise you need to add the following line to the .htaccess file for the directory:
4. Enjoy, the script should run.
Note: you should test python scripts locally, and only upload them once they are finished, since debugging on the server isn't easy.
PLEASE NOTE: Python and Perl are not currently (July 2, 2011) enabled on the Free Hosting Servers. You have to have pay to upgrade to at least the Illuminated package. Comparison of Plans.
1: Make sure your python script has the following as the very first line:
Code:
#!/usr/bin/env python
3. Make sure the .htaccess file is set up correctly to allow python to run:
If you placed the script in the cgi-bin directory the script will run directly, otherwise you need to add the following line to the .htaccess file for the directory:
Code:
AddHandler cgi-script .py
4. Enjoy, the script should run.
Note: you should test python scripts locally, and only upload them once they are finished, since debugging on the server isn't easy.
PLEASE NOTE: Python and Perl are not currently (July 2, 2011) enabled on the Free Hosting Servers. You have to have pay to upgrade to at least the Illuminated package. Comparison of Plans.
Last edited by a moderator: