How to fix: python file showing source code in browser instead of running as CGI script
Add:
Options +ExecCGI
AddHandler cgi-script .py
to httpd.conf or cgi-bin/.htaccess
Also be sure that your shebang line ( #!/usr/bin/python ) actually points at the path to your python executable
Options +ExecCGI
AddHandler cgi-script .py
to httpd.conf or cgi-bin/.htaccess
Also be sure that your shebang line ( #!/usr/bin/python ) actually points at the path to your python executable
Comments
Post a Comment