EXEC problem after Apache upgrade

We recently upgraded a server to Apache 2. All has gone well except for a site that has been running for years that makes use of an exec command to run a script that rotates pictures randomly....it is no longer working and instead of displaying the picture we get this error instead:

[an error occurred while processing this directive]

The error log shows this entry:
exec used but not allowed in /public_html/index.shtml

The actual command in the index.shtml page is:
#exec cgi="/cgi-bin/rand_photo.pl"

We've tried several fixes but still having the same issue...the "exec" is not being allowed. Hope somebody has run into this before and can point us in the right direction. Thanks!

We recently upgraded a server to Apache 2. All has gone well except for a site that has been running for years that makes use of an exec command to run a script that rotates pictures randomly....it is no longer working and instead of displaying the picture we get this error instead:

[an error occurred while processing this directive]

The error log shows this entry:
exec used but not allowed in /public_html/index.shtml

The actual command in the index.shtml page is:
#exec cgi="/cgi-bin/rand_photo.pl"

We've tried several fixes but still having the same issue...the "exec" is not being allowed. Hope somebody has run into this before and can point us in the right direction. Thanks!

Click to expand...

Sounds like you have IncludesNOEXEC enabled. This can be changed by going to WHM -> Service Configuration -> Apache Configuration -> Global Configuration and scrolling down. It is highly recommended you read the related documentation from Apache at: