Hello all,
Here is a very easy way to protect your config.php (and thus your valuable database):
- Copy your config.php from /includes/ directory, over the public area so nobody can access it with the browser.
- Open the config.php that still exists in /includes/ directory and remove all the code.
- Add only the following code:
Code:
<?php
require_once("/home/**username**/config.php");
?>
Ofcourse you need to replace **username** with your FTP username. Maybe you need to change the path. This example is from cPanel configuartions.
That's all. Connection details to your database are now hidden to hackers.
Maria
PS- I did a search before posting the advice, but I didn't found anything. If a similar article exists, then my apologies, but is well hidden