Hello,
I was wondering can you move the "config.inc.php" file out of the manager>includes folder to above the publicly accessible folders. For example, the area you access as soon as you login to your FTP. I remember Joomla could do this.
Thanks
-
☆ A M B ☆
- 24,524 Posts
Not at this time; or at least not without hacking a number of core files. You could more easily move the database access information to an external file, and include or require that file in the config.inc.php file.
Thanks a lot! That is exactly what I want to do, do you know how I can do that?
-
☆ A M B ☆
- 24,524 Posts
As long as your php is able to access directories above the web root, just create a file (maybe named "dbaccess.php") and cut/paste the db access section from the config.inc.php file. Replace it with
require_once("../../../dbaccess.php";
then put the dbaccess.php file one directory above the web root. If you put it somewhere else, you’ll have to adjust the path; what the above is saying is "move up three directories" (i.e. from where the including file is, includes, to -> manager to -> web root to -> one above web root). You could also use a hard-coded full path here instead of this relative path.
You’ll definitely want to close the parentheses in your require_once statement.
If that doesn’t work, try:
require_once("manager/includes/dbaccess.php");