View Single Post
  #2 (permalink)  
Old 10-13-2006, 11:51 AM
kgun's Avatar
kgun kgun is offline
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,344
kgun RepRank 3kgun RepRank 3
Default

Isn't it not enough

1. To write a database connection class (API). I think that class is already written in PEAR, so you do not need to reinvent the wheel. Then you use that class on the different sites. The PEAR connection class ought to (I do not know it in detail) take care of timeouts and server down cases.

2. It is always a good practice to store configuration information in a file and require (include) it in your applications.
3. If it contains sensitive information like passwords etc. the .ini file should be located in a directory that it is difficult to guess the name and location of and give it a cryptic name. If you know the PHP parse_ini_file function, you can parse that sensitive information (CrypiticNameConfiguration.ini file) and in that way make it more hidden to potential hackers.
Reply With Quote