title: cgi perl scripts not working, only cgi bash scripts are working?
body: <p>i am having strange problem., </p>
  
  <p>from <strong>command line cgi bash scripts and cgi perl scripts are working</strong>,  but <strong>from browser only cgi bash scripts are working and not the cgi perl</strong>.</p>
  
  <p>after accessing cgi perl scripts from browser i get <strong>500 Internal server error</strong>.</p>
  
  <pre><code>and apache error log says
  
  [Thu Oct 25 01:58:59 2012] [error] [client x.x.x.x] (13)Permission denied: exec of '/home/x/x/x/x/public_html/cgi-bin/test.cgi' failed
  [Thu Oct 25 01:58:59 2012] [error] [client x.x.x.x] Premature end of script headers: test.cgi
  </code></pre>
  
  <p>i want to run cgi perl scripts from browser .</p>
  
  <p>how do i do it.</p>
  
  <pre><code>[root@www ~]# which perl
  /usr/bin/perl
  
  [root@www cgi-bin]# perl test.cgi
  Content-type: text/plain
  
  testing...
  </code></pre>
  
  <p>source of test.cgi</p>
  
  <pre><code>#!/usr/bin/perl
  
  print "Content-type: text/plain\n\n";
  print "testing...\n";
  </code></pre>
  
  <p>Thanks for your time.</p>
  
  <p>its a dedicated server with apache 2.</p>