Friday, 8 March 2013

Unable to include potential exec

If you use Server Side Includes,
you may receive 500 error or "[Thu Jul 30 00:04:46 2009] [error] [client] unable to include potential exec "/cgi-bin/randhtml.cgi" in parsed file /home/username/public_html/index.html referer:

Including executables are no longer allowed by default apache configuration. IncludesNOEXEC is now the default, SSI includes are now disabled by default. This is done to prevent server abuse / insure server security. We recommend using PHP coding wherever possible. If using cgi includes is ABSOLUTELY necessary you may enable the includes via :

Create/edit the .htaccess file (you may find it within public_html folder) to permit the execution of CGI programs with the following options: NOTE: backup file prior modification!!!

Enter the following:
Options +Includes +ExecCGI
AddHandler cgi-script .cgi .pl

Save .htaccess file.

You may also try this code inside .htaccess:
Options +Includes
AddHandler server-parsed .shtml

That's it. You're done.