in reply to
Where should I have configuration information in a file or database
In most of the case, the file is simplest way to store the configuration information. We can easily handle like changing configuration information. We don't want to enter into database regularly.
on the basis of security
If you are storing the information in database, you have to give database user name and password in the function to connect database. It may not secure if your are giving program to some other person. But if you are storing in file, it's not needed. But at the same time, the file don't have permissions for other users.