Page 1 of 1
DB connect script out of WWW folder, but can not open.
Posted: Wed Feb 06, 2008 6:47 pm
by lafflin
I am trying to leavde my DB Connect script out of my WWW folder for security reasons, but It seems that I am unable to open the file by way of "require_once" when I try to call it. I am somewhat of a beginner and have not actually done this yet. i am using a default install of WAMP for development if that matters at all. Am I missing something here?
Re: DB connect script out of WWW folder, but can not open.
Posted: Wed Feb 06, 2008 11:18 pm
by Festy
Can you post your code here?
Re: DB connect script out of WWW folder, but can not open.
Posted: Thu Feb 07, 2008 12:35 am
by Mordred
Should be able to, either by adding the non-www directory to the include path in php.ini, or by including with ../../blabla
You must know that this doesn't add much protection (it adds *some*) - for example local file include vulnerabilities may still be able to expose the file. Check this out for other options:
http://shiflett.org/articles/shared-hosting