i got a new account in plan #1
kdmq.pcriot.com
python/perl won't work
all files in cgi-bin
all file headers #!/usr/bin/python or perl
all chmod set to 0777
PHP works as long at the files are out of cgi-bin
so what do i need to change. :happysad:
i got a new account in plan #1
kdmq.pcriot.com
python/perl won't work
all files in cgi-bin
all file headers #!/usr/bin/python or perl
all chmod set to 0777
PHP works as long at the files are out of cgi-bin
so what do i need to change. :happysad:
What errors do you get?
Also do you have the shebang line?
#!/usr/bin/perl
#!/usr/bin/python
#!/usr/bin/env python
Check the output of your CGI scripts on your development server and your error logs. You must output properly formatted headers before other output else you'll get a 500 error. Any script errors will be printed to stderr, which is unbuffered and will be output before anything your script prints to stdout. Thus script errors cause a 500 server error. Even if your scripts work locally, they could be producing an error on the server (often due to a missing/not found library).
The computer you use to develop. It could be as simple as the computer with a test editor or it could run a web server configured for debugging of live scripts.
Go to the command line and run your script. If you're running MS Windows, you'll first need to install Perl (e.g. ActivePerl) and Python to run the scripts.
The script you posted shouldn't produce errors. There's probably a problem with the server configuration. As long as both the scripts and cgi-bin directory have mode 755 (777 means everyone has write access, which is a big security risk), it isn't a permissions problem. Check the "Apache Handlers" section of cPanel; you should see a "cgi-script" handler for file extensions .cgi and .pl (among others). Also check your error log in cPanel. If nothing is there, post your root .htaccess; there might be something misconfigured in there.