If you created the 'config.php' file in a text editor, please make sure that it is named 'config.php' and that it does not have a different file extension such as 'config.php.txt'.
Also, please check that your web server has PHP installed on it. (Most web servers have PHP installed by default but it would be worth checking to be sure.)
If you continue to experience difficulties, please post the URL to your gallery's web page so that I can see the problem for myself and hopefully help further.
It might also help if you could zip your complete gallery folder and upload it somewhere (and provide a download link) so that I can take a look at all your files together and figure out what the problem is. Thank you.