The coppermine config has never been stored in a flat file, in no coppermine version ever. The only thing that is stored in a plain-ext file is the mysql connection data (that is of course needed to make the script connect to the database in the first place). I can't see why you would want the config to reside in a plain text file - coppermine will still be a database-driven app, as everything else (pics, users, comments etc.) resides in the database. I can't see any reason why you should want to just put your config into a plain text file.
Refreshing a config file is of course silly, it would have to be refreshed every time you change it. If you decide to change it manually, you'd have to come up with a custom script that triggers the refresh.
Doing what you're up to would make a lot of code changes necessary, especially if you're trying to make coppermine use plain text files exclusively (converting it from a database-driven app to a plain-text file app), as coppermine hasn't been built to contain a database abstraction layer.
Hi GauGau-
I think maybe you misunderstood me.
I understand that Coppermine is a database-driven app.
I've been doing some customizing, and so I have been poking around the code. I have also logged in through mysql and poked around the table structure. Been developing for over ten years, mainly on the database side. Still new to PHP but learning. I have written many database-driven apps. So I know that a lot of info is being stored in the DB.
But when I (quickly) looked through the code and DB, it seemed to me that:
1) The table cpg144_config contains nothing but the config data.
2) There is a call on line 150 of init.inc.php to include the config file if it exists. Inside the config file the connect info to the DB is defined and put into the config array.
3) There is a call on line 173 of init.inc.php to read the config info from the database if "mb_internal_encoding" is set. The info in the DB is added to the same config array.
So as someone who has written code before, it seems to me that if I place the config info directly into config.inc.php, and comment out Step 3, the system should still work. And this would allow me to have an Admin version of CPG as well as a User version. The user version could drive off of the static config file. The Admin version could drive off of the database. And every night a cron job could regenerate the User config.inc.php file - this company already has many processes that run like that and no one feels they are "silly". I am not suggesting that Coppermine would be "converted" to flat file. I am talking only about the info in the config table. I didn't see any other references in the code, where this info is not just included - but if there are it would be great to know where they are or what functions to look for... which is why I started this thread.
The reasons why you might want to have the config info in a flat file are many - probably
running two Coppermine versions(User, Admin) against a single DB,
version control and
rollback capability are the main ones for this project. When you have a lot of users, you have to be concerned with maintaining an audit trail of changes, not because you don't necessarily trust your Admins, but because if something goes wrong, you want to be able to roll back to a previous configuration.
Databases are great at managing large sets of data. But for something like configuration data, how can you store versions and rollback to a previous config if it's in the DB?
P.S. - Regarding your comment about refreshing a config file being "silly", there is no need to be rude just because you have a difference of opinion. I am just asking a question, which is the whole purpose of this board, right? Frankly, that kind of comment is petty, uncalled for, and unprofessional, and it reflects poorly upon you, IMHO.
P.P.S. - the whole idea behind
open source is that people can change the source to meet their needs, isn't it?
P.P.P.S. - I was searching the CPG forum on this topic and I thought I pulled up some threads referencing a flat-file based config in an earlier version, but maybe I was just thinking that because there is a flag "mb_internal_encoding" that there were probably two options for that...since you wouldn't need a flag if there is only one option, right?