Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following Server Side Includes within an .html file called test.html...

<!--#include virtual="/cgi-bin/myScript.cgi"-->

<!--#include virtual="/includes/myFile.html"-->

When I view test.html live in my browser, myFile.html is being inserted/rendered just fine, however myScript.cgi is giving me [an error occurred while processing this directive].

  • From the browser address bar, /cgi-bin/myScript.cgi is rendering output just fine, proving the file exists at the path and the permissions are correct (755).

  • The SSI handlers are set correctly as myFile.html is included just fine, proving the page is being parsed.

So if SSI is working and myScript.cgi is working, why isn't #include virtual working on this script?

As a side-note, this is on a cPanel hosting account and I have many other accounts (sites) at the server at the same hosting company with the same configuration. The others are all working as expected.

  • cPanel Version: 11.30.6 (build 3)
  • Apache version: 2.2.17
  • Architecture: x86_64
  • Operating system: linux
  • Perl version: 5.8.8
  • Kernel version: 2.6.18-194.32.1.el5
  • cPanel Pro: 1.0 (RC1)

The script simply returns the year from today's date as formatted text. The output is preceded by Content-type: text/html\n\n and it's not a new Perl script. It's working on the other accounts.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

My hosting company escalated the issue to cPanel, and to my embarrassment, it ended up being a setting in my .htaccess file that was missing after all.

The account that was working had this line, where the broken account, did not...

Options All -Indexes

All, by default, includes what the hosting company added in order to get it working...

Options +Includes +ExecCGI

Without +ExecCGI, it breaks as I described in my original posting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.