Per the script author, I have entered the command line in the .shtml file as follows:
<!--#exec cgi="/cgi-bin/test/test.cgi"-->
According to my hosting provider, CGI/Perl scripts must run through a specified directory:
http://cgibin.host.com/username/
I have tried several ways to enter the path to the CGI script, but always receive "An error has occurred while processing this directive".
The script works when run from the shell.
Any thoughts?
Thanks for your help,
Michelle
Any thoughts on what else I can try?
Also, when using
<!--#exec cgi="/cgi-bin/test/test.cgi" -->
should this path always start with /cgi-bin/?
If my service provider has advised that all CGI scripts must run through a specified directory, where do I point the script to that part of the path?
I have been doing a little reading on ScriptAlias. Is this something I might need to do?
According to my hosting provider, CGI scripts must run
through [cgibin.host.com...]
If I type in my address window
[cgibin.host.com...]
the script works.
I can't seem to find the correct path for the .shtml file.
I tried including the rest of this path in the exec command, and received the same error.
Instead of:
<!--#exec cgi="/cgi-bin/test/test.cgi" -->
I tried:
<!--#exec cgi="/cgibin.rcn.com/username/cgi-bin/test/test.cgi" -->
It seems no matter what combination I try, the path is just not correct.
Appreciate your help!
- have you been able to run any Perl/CGI scripts on the site? (ie- a simple hello world script in the CGI-BIN)
- If you have run other scripts on the site, Have you set the CHMOD settings for "test.cgi" correctly?
- If you are using FTP to upload the script, are you sure you used ASCII mode when you transfered the "test.cgi" file?
What host are you using? Do they have published FAQ files for CGI/Perl script issues?
I have FTPd the script through as ASCII and CHMOD to 755.
I have tried the test.cgi script and the hello.pl script. Both produce the expected results from the web server. The problem occurs when I try to execute the script from the .shtml file.
When entering <!--#exec cgi="/cgi-bin/hello.pl" --> in the shtml file, I receive the same error.
I have read and re-read the FAQ provided by the service provider and have yet to figure out the problem.
According to the FAQ: 'All CGI programs and scripts must run through "http://cgibin.host.com". For instance, the action statement of your form tag would be: <form action="http://cgibin.host.com/username/cgi-bin/hello.pl" method="post">'.
No examples of the path for use of a 'exec cgi' command.
I have tried to include the full path in my exec command <!--#exec cgi="/cgibin.host.com/username/cgi-bin/hello.pl" --> and I get the same error.
If the script works from the web server, why doesn't the same path work under for executing the command?
I have tried to include the full path in my exec command <!--#exec cgi="/cgibin.host.com/username/cgi-bin/hello.pl" --> and I get the same error.If the script works from the web server, why doesn't the same path work under for executing the command?
It looks like you don't need the "/" before cgibin.host.com, ie-
<!--#exec cgi="cgibin.host.com/...
or maybe try-
<!--#exec cgi="http://cgibin.host.com/...
If neither works, and you want to send me a private message, I'll take a look at it on your server.