From 2c9f58d3392d806598b133f4726f7aad62220f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Nov 2023 19:33:30 +0100 Subject: [PATCH] fix --- conf/database.php | 98 +++++++++++++++++++++++++++++++++++++++++++++++ scripts/install | 8 ++-- 2 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 conf/database.php diff --git a/conf/database.php b/conf/database.php new file mode 100644 index 0000000..a16ea1b --- /dev/null +++ b/conf/database.php @@ -0,0 +1,98 @@ +db->last_query() and profiling of DB queries. +| When you run a query, with this setting set to TRUE (default), +| CodeIgniter will store the SQL statement for debugging purposes. +| However, this may cause high memory usage, especially if you run +| a lot of SQL queries ... disable this to avoid that problem. +| +| The $active_group variable lets you choose which connection group to +| make active. By default there is only one group (the 'default' group). +| +| The $query_builder variables lets you determine whether or not to load +| the query builder class. +*/ +$active_group = 'default'; +$query_builder = TRUE; + +$db['default'] = array( + // The following values will probably need to be changed. + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => '__DB_NAME__', + 'password' => '__DB_PWD__', + 'database' => '__DB_USER__', + // The following values can probably stay the same. + 'dbdriver' => 'mysqli', + 'dbprefix' => '', + 'pconnect' => TRUE, + 'db_debug' => (ENVIRONMENT !== 'production'), + 'cache_on' => FALSE, + 'cachedir' => '', + 'char_set' => 'utf8mb4', + 'dbcollat' => 'utf8mb4_0900_ai_ci', + 'swap_pre' => '', + 'encrypt' => FALSE, + 'compress' => FALSE, + 'stricton' => FALSE, + 'failover' => array(), + 'save_queries' => TRUE +); diff --git a/scripts/install b/scripts/install index 0128630..6faccc5 100755 --- a/scripts/install +++ b/scripts/install @@ -41,12 +41,12 @@ chmod 644 "/etc/cron.d/$app" #================================================= # ADD A CONFIGURATION #================================================= -# ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -# ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +ynh_add_config --template="database.php" --destination="$install_dir/application/database.php" -# chmod 400 "$install_dir/some_config_file" -# chown $app:$app "$install_dir/some_config_file" +chmod 400 "$install_dir/application/database.php" +chown $app:$app "$install_dir/application/database.php" #================================================= # END OF SCRIPT