1. Start creating a test script, name the file "mytest.py" for example, containing this code:
print "Content-type: text/html\n\n"
print "<html>Hello world!</html>"
2. Create the file mytest.py in /home/username/public_html/cgi-bin directory (replace "username" with your cPanel username)
3. Correct the file permission, you can do this with your FTP program or through SSH (if you have access):
The ssh comand is: chmod +x mytest.py
At this point, the script should work using http://yourdomain.com/cgi-bin/mytest.py
If you would like the script to run outside the cgi-bin directory, place the following content into the .htaccess file in your public_html directory:
AddHandler cgi-script .py
You could then copy the file mytests.py to /home/username/public_html and have it work there as well so you can run it accessing to http://yourdomain.com/mytest.py
- 4 Users Found This Useful
How can i change the MySQL characters encoding to UTF8?
By default the encoding is latin1 but you could try to workaround your code. To change the...Oscommerce is showing a blank page in the categories pages
If you made no changes in your account or oscommerce script and this happened suddenly then there...I have the register_globals disabled server wide, how can i enable it in my account?
This option is available in all our shared cPanel hosting accounts.Please note if your script is...How could i change the PHP encoding in my scripts?
You could try changing it sending the headers in your php code, i.e.: header('Vary:...How do i parse .html files as .shtml (SSI)?
You can add the following line in your .htaccess file: AddHandler server-parsed .html or...