Howdy,
> Can any one help me in executing a .cgi file.?
> Actually for php to work we are placing it in /var/www/html/ or
> /usr/local/apache/htdocs/(while installing with open source), likewise for
> cgi file were to place.
There're a few things you must do in order to execute a cgi script.
Since I don't know what you have or haven't done, I'll just list them all.
1. Make sure that your script has the proper execution line at the top of
yourscript. (IE: #!/usr/bin/perl)
2. Your script needs to be placed in a cgi-bin directory as configured in
your httpd.conf. (or other appropriate files) In Apache this is
/usr/local/apache/cgi-bin/ by default.
3. And last, your script should be executable. (IE: chmod +x testscript.pl)
And of course, you need to send the correct header information at the
beginning of your script. (Content-type: text/html, and such)
Something else that might help you is '/usr/local/apache/logs/error_log'.
It provides some pretty detailed logging for cgi errors.
Hope I could help,
Scott.