Stop scripts in folders with ExecCGI

datacreek

Verified User
Joined
Feb 5, 2006
Messages
14
I have several folders that need to be chmod 777. I am trying to disallow any script including php from running from those folders.

I added a .htaccess file to each with:
OPTIONS -Indexes -ExecCGI
but that didn't work. Tried:
OPTIONS -Indexes -ExecCGI
AddHandler cgi-script .pl .cgi .php

Tested using a simple "hello world" php doc.
and that only works after refresh from the browser. "Hello World" is displayed but after refresh I get server error.

I have tried placing ExecCGI (Allowoverrides) or variation per suggestions found here in the user http.config file to no effect.

Can someone please help. Basically i would like to protect those directories from the ability to run scripts with .htaccess.
 
I have the same problem!
Before -ExecCGI worked and now it stops to work and the php files are running.
It's really boring, I need that command for protect my sites.
Is there somebody can help?
Maybe a DirectAdmin upgrade is the cause. I don't see any other reason that it has stopped to work.
 
If php is running as an apache module and not cgi then of course -ExecCGI will have no effect.
 
If php is running as an apache module and not cgi then of course -ExecCGI will have no effect.

Well! Before it worked and I'm quiet sure that apache has always been as a module. So, I don't understand.
 
Back
Top