To make the contents of 'config.php' a little more secure you can add the following to the top of the file;
- Code: Select all
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
this will then result in this if someone tries to access the file directly.
The complete file should then look like this;
[code highlight="11,13-16,18"]<?php
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
// phpBB 2.x auto-generated config file
// Do not change anything in this file!
$dbms = 'mysql';
$dbhost = 'localhost';
$dbname = 'your db name';
$dbuser = 'your db username';
$dbpasswd = 'your db password';
$table_prefix = 'phpbb_';
define('PHPBB_INSTALLED', true);
?>[/code]
In the above the highlighted lines may be different in the file you have due to the different db server and the other connection settings along with a different table prefix if your not using the default of 'phpbb_'.
Adding this check to the file should not affect any mods installed on the forum. However, if you start getting 'hacking attempt' messages then make sure 'IN_PHPBB' is defined before including 'config.php'.
Also make sure that the file 'config.php' is CHMOD'd to 644


