I am finding it impossible to do an SSI, in order to run a CGI file on one of my webpages. Here's the background: The calling file is b2.shtml, and has permissions 644. The CGI file, ball.cgi, is in a different folder, and has permissions 644. Here is my calling SSI: <!--#exec cgi="cgi-bin/ball.cgi"--> This gives rise to: [an error occurred while processing this directive]. And the error log says: invalid CGI ref "cgi-bin/ball.cgi" I have tried all possible variations on the SSI statement ( initial forward slash, initial ../, initial ../../, using include, ... ) . I have also tried putting the included file in the same directory as the calling file. The result is either the same as above, or there is no error at all ( with no output ). I have also Googled 'invalid CGI ref', which yields predominately 10-year-old references, many of which are conflicting, and none of which have an answer to my problem. I'm at my wits end. I know the problem is solvable, since I have used SSIs before, many times. It's got to be some dumb mistake, but I can't figure it out! --- Professor
The directory (and more specifically, the file itself) must have the permissions set to 755 to allow it to execute. Make sure both are set properly and try again.
Thank you, thank you, thank you. That's just the kind of almost trivial mistake I knew it had to be. NOWHERE I looked did it mention that permissions should be set to 755. It's now working just fine. --- Professor