Give us some background - when you say your config.php is correct, are you saying you have tested it to assure so.
Here is a php routine that will assure that your at least connected to your database (please excuse me if your past this type of basic, I just want to help if I can):
<?php
mysql_connect("localhost", "php_user", "user_pass") or die(mysql_error());
echo "Connected to MySQL
";
?>
Of course you must replace the php_user and user_pass with your info (and localhost is not always correct - your host may have another connect method).
Ron