Re: config.php security?
Posted: Fri Jan 18, 2008 5:22 pm
I just tried denying access to config.php using .htaccess. It works and doesn't appear to break anything. So if someone requests that file directly they'll get a 403 error, but Apache and PHP can still read it to get the info out of it they need.
# Deny access to config.php
order allow,deny
deny from all
EDIT: FIXED so it shouldn't break TinyMCE anymore.... Don't use a tilde, otherwise it'll break TinyMCE. Note I do not know if this will break other functions of CMSms. I found a few other files named config.php If you want to use this hack to "protect" config.php you may need to go into the other directories where there is a config.php file and specifically allow that file.
The reason this broke TinyMCE was because that tinyconfig.php gets loaded as javascript and wasn't getting loaded.
# Deny access to config.php
order allow,deny
deny from all
EDIT: FIXED so it shouldn't break TinyMCE anymore.... Don't use a tilde, otherwise it'll break TinyMCE. Note I do not know if this will break other functions of CMSms. I found a few other files named config.php If you want to use this hack to "protect" config.php you may need to go into the other directories where there is a config.php file and specifically allow that file.
The reason this broke TinyMCE was because that tinyconfig.php gets loaded as javascript and wasn't getting loaded.