SSI - [an error occurred while processing this directive]

loopforever

Verified User
Joined
May 30, 2003
Messages
298
Location
/home/admin
Hi John,

I'm having a bit of trouble getting ssi documents to include files properly. I've tried including the file using both relative and absolute paths, but I receive the same error: "[an error occurred while processing this directive] " on a command like this:

<!--#include virtual="/includes/cookieparse.php?location=indexnews"-->

In an attempt to resolve the error, I added:

AddType text/html .shtml
AddHandler server-parsed .shtml

Options +Includes

to the domain's vhost entry - but still had no luck after restarting Apache.

Any ideas on why this is happening?
 
I couldn't really say.. I did a quick shtml test with php and found that it is capable of being included with get parameters.. so ?location=indexnews should be alright... could you try breaking it down to the absolute minimum.. create a test file and insert only that shtml code. Could it be caused from something else in the file? how about file permissions and things like that? Give those a try and see if they help.

John
 
Well, it *should* be... But doesn't seem to be... I'm going to play around with the main httpd.conf to see what's up.

John
 
Hey John,

I haven't tested this yet, but I believe the problem lies in the user's http.conf file. Add this to the vhost template:

<Directory /home/username/public_html/>
Options +Includes
</Directory>

This should solve the problem, let me know how it goes :).
 
DirectAdmin Support said:
Well, it *should* be... But doesn't seem to be... I'm going to play around with the main httpd.conf to see what's up.

John

Personally, I think this should be optional, along with php.
 
Back
Top