SSI Random Image Displayer FAQ

Frequently asked questions about Server Side Includes and the random image script.

Q1: How do I set up the SSI Random Image script?

To set up the SSI Random Image script:

  1. Upload the script:
    Upload ssi_image.pl to /cgi-bin/
    chmod 755 ssi_image.pl
  2. Configure image directory:
    $image_dir = "/home/user/public_html/images/random/";
    $image_url = "/images/random/";
  3. Include in your .shtml page:
    <!--#exec cgi="/cgi-bin/ssi_image.pl"-->
Note: Your server must have SSI enabled for this to work.

Q2: Why isn't my image displaying?

If images aren't displaying, check these common issues:

  1. SSI is disabled: Ensure your page has .shtml extension or SSI is enabled for .html
  2. Wrong image directory: Verify $image_dir is the correct server path
  3. Wrong image URL: Ensure $image_url matches the web path
  4. No images in directory: Check that images exist and are readable
  5. Script permissions: Script must be executable (755)

Test the script directly:

http://yourdomain.com/cgi-bin/ssi_image.pl
Debug: Check your server error log for specific error messages.
Back to FAQ