In Progress Move config.php settings to database

The development of this suggesion is in progress.

eugenio

Administrator
Staff member
Hi,
I am working hard on the new upgrade procedure. A new script allows to upgrade a DaDaBIK installation just by putting the new zip package into the "upgrades" folder and run the script; everything (files copy, database changes, ... ) is handled by this script.
One of the difficult parts is keeping your config.php settings if the config file (instead of the config_custom file) has been edited.
I am thinking about moving the config settings to the database: this would simplify the upgrade and maybe it's a good thing to do anyway.
In the config.php file we would only store the database connection parameters, while all the other parameters could be changed from the admin section, as it happens for Data -> Settings now.
It would be a big change and quite a lot of additional work, so I am curious to hear your thoughts about this, do you see any disadvantages in having the settings in the admin section instead of in a file?
 
Last edited:
Upvote 7

deep64blue

DaDaBIK Guru
I can see the attraction of this change but it's a bit problematic with my workflow, perhaps you have a better suggestion for me :)

I develop locally on a laptop or a VM then push changes to production on my hosted service. I have different parameters for each environment stored in my config_custom.php with the unneeded one commented out.

Code:
#Server
$host = 'server';
$db_name = 'serverdb';
$user = 'serveruser';
$pass = 'serverpassword';
$upload_directory = '/home/xyz/123/user7/';
$title_application = 'Dadabik Test System';
$debug_mode = 0;
$enable_data_tab_operations = 0;
    
#Local
/*
$host = 'localhost';
$db_name = 'mydb';
$user = 'myuser';
$pass = 'mypassword';
$upload_directory = '/home/d64/WebServer/uploads/';
$title_application = '** Dev** Dadabik Test System** Dev** ';
$debug_mode = 1;
$enable_data_tab_operations = 1;
*/
 
Top