Web Hosting Talk







View Full Version : Help Help in Running Perl Scripts in SSI Pages Please!!


dgessler
07-30-2001, 08:17 PM
I was wondering if anyone could help me out here. I cannot view a banner rotation script or ANY other script that requires SSI to run. The scripts are working, but for some reason when I make the cgi command to show a cgi script using SSI (<!--#exec cgi="url to script" -->) it simply does not show. And my host DOES support SSI and ssi does work on their server using the normal way. Ive tryed doign this on 2 hosts so far so I know I must be doing somethign wrong? Both the hosts I have tried it on use CPanel and I am not sure whether that effects anything or not. Has anyone had an experience like this? Please reply if you know anythign about this or something I might be doing wrong, thanks

bombino
07-30-2001, 08:22 PM
Try <!--#include virtual="/relative/path/to/script"-->

bombino
07-30-2001, 08:23 PM
You could also look in your error_log for what might be the problem. ;)

elsmore1
07-30-2001, 11:21 PM
Probably the first thing to do if there is no output at all where you are expecting the SSI output to be is to ensure that the server is actually parsing the SSI tag.

If you "View Source" on the .html/.shtml page when viewing it with your browser, the SSI tag should not be there. If it is, it means that the server did not parse the page for SSI. Possible reasons for this are varied, but include not having the correct file extension (some servers require a .shtml or .shtm ext for parsed files) or you don't have SSI enabled in the directory the file is in.

If the server did parse the page, but was unable to execute the instructions for some reason, you should see "An error occurred while processing this directive" or something.

If you don't get the above error message, and the SSI tag is not included in the html output from the server, and there is still no apparent output from the script, it usually means that the script started running, but failed sometime after outputting the Content-type header for the server, or the script did complete successfully, but for some reason had nothing to print (other than the content-type header). If this is the case, you may find the reason in the error logs for the server. If you can find those but don't understand them, post again and we may be able to help.