[Phpmyadmin-devel] Storing Server Configuration in Database

Roland Knall roland.knall at web.de
Sun Nov 18 06:38:11 CET 2001


Hi Everyone

First I want to excuse if this task has already been discussed. I do not want
to produce overhead ;-)

I am working with PHP and MySQL all day long, and have to work with several
customer databases. Therefore I have every database in the config file.
Adding a new database is really inconvinient, and I simply hate the way it is
done. Not because it is not useful, but simply because I have to leave the
Browser window. After adding a 6th database this morning, I decided to do
something against it. Here is what I have done:

The Database configurations are being stored in a database table. In the
config.inc.php the $cfgServer entries have been removed, instead some
$cfgDBServer entries have been written, to select the database in use.
Adv_Auth entries can either be entered globally by setting

$cfgDBServer["adv_auth"]

or database specific by setting the corresponding database entry.

libraries/common.lib.php has been expanded by adding a short (starting
at about line 300 ) If clause which checks for $cfgDBServers being TRUE,
unsetting $cfgServer if this is the case, and reading the entries from the
Database table. Therefore existing configurations have to be proted to the
database, I guess you could uncomment the unset($cfgServers) statement
without any problems, this was simply not what I wanted it to do.

Localization in the error messages is not being done by now, the errors occur
in english.

I append the additions to common.lib.php  and config.inc.php as diff against
the current Release Candidate ( 2.2.2-rc1 ) version. I do not know if it
works against CVS, but should do so without any problems. Keep me posted, if
it works and what you think of it.

CU Roland

-------------- next part --------------
A non-text attachment was scrubbed...
Name: library.diff
Type: text/x-diff
Size: 3174 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20011118/d55b6458/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.diff
Type: text/x-diff
Size: 7754 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20011118/d55b6458/attachment-0001.diff>


More information about the Developers mailing list