title: What causes "suexec policy violation" when Perl is called via server side include?
body: <p>I'm working on a Perl script which is called from a server side include on an Apache 2 server. The script is displaying the generic &quot;Internal Server Error&quot; page rather than showing me the actual error. When I check the Apache error log, I see these messages:</p>
  <pre><code>unable to include &quot;/foobar/index.pl&quot; in parsed file /home/foouser/domains/foosite.com/public_html/foobar/index.shtml, referer: http://www.foosite.com/foobar/
  suexec policy violation: see suexec log for more details, referer: http://www.foosite.com/foobar/
  Premature end of script headers: settings.pl, referer: http://www.foosite.com/foobar/
  </code></pre>
  <p>How do I get a Perl script to show an error rather than &quot;Internal Server Error&quot;?</p>
  <h2>Update:</h2>
  <p>I should have asked a separate question for this, because I have since learnt that this <em>does</em> send errors to the browser (<a href="https://stackoverflow.com/questions/2033726/what-causes-suexec-policy-violation-when-perl-is-called-via-server-side-include/2033733#2033733">thanks brian</a>):</p>
  <pre><code>use CGI::Carp qw(fatalsToBrowser);
  </code></pre>
  <p>However, if the problem is with the Apache config rather than the Perl script, then the error will not be sent to the browser because the Perl code is not being interpreted. In this case, we can tell that I am experiencing an Apache error (rather than a Perl error) because of this line:</p>
  <pre><code> suexec policy violation: see suexec log for more details
  </code></pre>
  <p>This occurs when Apache is running in SUexec mode (which seems to be common for shared hosting). I'm not sure what exactly has been changed to cause this error, but that's what I'm trying to find out.</p>