Hello
testing
I'm running the install script and I get , follows after log
--- LOG ----
ERROR - 2023-02-15 09:21:49 --> Error connecting to the database: Unknown database 'helpdeskz'
CRITICAL - 2023-02-15 09:21:49 --> Unable to connect to the database.
#0 /var/www/helpdesk/hdz/framework/Database/BaseConnection.php(618): CodeIgniter\Database\BaseConnection->initialize()
#1 /var/www/helpdesk/hdz/framework/Database/BaseBuilder.php(1866): CodeIgniter\Database\BaseConnection->query()
#2 /var/www/helpdesk/hdz/app/Libraries/Settings.php(20): CodeIgniter\Database\BaseBuilder->get()
#3 /var/www/helpdesk/hdz/app/Controllers/BaseController.php(71): App\Libraries\Settings->config()
#4 /var/www/helpdesk/hdz/framework/CodeIgniter.php(909): App\Controllers\BaseController->initController()
#5 /var/www/helpdesk/hdz/framework/CodeIgniter.php(969): CodeIgniter\CodeIgniter->createController()
#6 /var/www/helpdesk/hdz/framework/CodeIgniter.php(349): CodeIgniter\CodeIgniter->display404errors()
#7 /var/www/helpdesk/index.php(44): CodeIgniter\CodeIgniter->run()
#8 {main}
---- end log ----
My webserver is a virtual machine Ubuntu Server 22.04 with PHP 8.2 and latest Apache2 (I have virtualbox intalled on my laptop) and in the Helpdesk.php I have setup root as DB user and its password EXACTLY as I use them with phpMyAdmin on this self laptop
/var/www/helpdesk is the path
I have created a virtual host with this URL helpdesk.box and edited accordingly the hosts file on either windows client and
when I point to http://helpdesk.box/install it starts smoothly
then first click on "Fresh Install"
then on "Continue"
then Whoops
Infact the DB hasn't been created . I have another virtual host with another CodeIgniter 4 lil app and it works correctly with the database
Could it be matter of some permission in some directory of the HelpDeskZ tree?
Thank you for hinting
----
IN my Helpdesk.php I have
class Helpdesk extends BaseConfig
{
#Database host
const DB_HOST = 'localhost';
#Database username
const DB_USER = 'root';
#Database password
const DB_PASSWORD = '*********';
#Database name
const DB_NAME = 'helpdeskz';
#Database table prefix
const DB_PREFIX = 'hdz_';
#Database port, do not change it if you are not sure
const DB_PORT = 3306;
#URL of your helpdesk
const SITE_URL = 'http://helpdesk.box';
OUCH!
Solved ... I had to create manually the DB because I don't have an administrator user and mysql/mariaDB current, complains if you manage as root
Solution
I have manually created the database helpdeskz and then created and given admin privileges to some "helpdekdb" user
testing
I'm running the install script and I get , follows after log
--- LOG ----
ERROR - 2023-02-15 09:21:49 --> Error connecting to the database: Unknown database 'helpdeskz'
CRITICAL - 2023-02-15 09:21:49 --> Unable to connect to the database.
#0 /var/www/helpdesk/hdz/framework/Database/BaseConnection.php(618): CodeIgniter\Database\BaseConnection->initialize()
#1 /var/www/helpdesk/hdz/framework/Database/BaseBuilder.php(1866): CodeIgniter\Database\BaseConnection->query()
#2 /var/www/helpdesk/hdz/app/Libraries/Settings.php(20): CodeIgniter\Database\BaseBuilder->get()
#3 /var/www/helpdesk/hdz/app/Controllers/BaseController.php(71): App\Libraries\Settings->config()
#4 /var/www/helpdesk/hdz/framework/CodeIgniter.php(909): App\Controllers\BaseController->initController()
#5 /var/www/helpdesk/hdz/framework/CodeIgniter.php(969): CodeIgniter\CodeIgniter->createController()
#6 /var/www/helpdesk/hdz/framework/CodeIgniter.php(349): CodeIgniter\CodeIgniter->display404errors()
#7 /var/www/helpdesk/index.php(44): CodeIgniter\CodeIgniter->run()
#8 {main}
---- end log ----
My webserver is a virtual machine Ubuntu Server 22.04 with PHP 8.2 and latest Apache2 (I have virtualbox intalled on my laptop) and in the Helpdesk.php I have setup root as DB user and its password EXACTLY as I use them with phpMyAdmin on this self laptop
/var/www/helpdesk is the path
I have created a virtual host with this URL helpdesk.box and edited accordingly the hosts file on either windows client and
when I point to http://helpdesk.box/install it starts smoothly
then first click on "Fresh Install"
then on "Continue"
then Whoops
Infact the DB hasn't been created . I have another virtual host with another CodeIgniter 4 lil app and it works correctly with the database
Could it be matter of some permission in some directory of the HelpDeskZ tree?
Thank you for hinting
----
IN my Helpdesk.php I have
class Helpdesk extends BaseConfig
{
#Database host
const DB_HOST = 'localhost';
#Database username
const DB_USER = 'root';
#Database password
const DB_PASSWORD = '*********';
#Database name
const DB_NAME = 'helpdeskz';
#Database table prefix
const DB_PREFIX = 'hdz_';
#Database port, do not change it if you are not sure
const DB_PORT = 3306;
#URL of your helpdesk
const SITE_URL = 'http://helpdesk.box';
(02-15-2023, 03:37 PM)Corsari Wrote: Hello
testing
I'm running the install script and I get , follows after log
--- LOG ----
ERROR - 2023-02-15 09:21:49 --> Error connecting to the database: Unknown database 'helpdeskz'
CRITICAL - 2023-02-15 09:21:49 --> Unable to connect to the database.
#0 /var/www/helpdesk/hdz/framework/Database/BaseConnection.php(618): CodeIgniter\Database\BaseConnection->initialize()
#1 /var/www/helpdesk/hdz/framework/Database/BaseBuilder.php(1866): CodeIgniter\Database\BaseConnection->query()
#2 /var/www/helpdesk/hdz/app/Libraries/Settings.php(20): CodeIgniter\Database\BaseBuilder->get()
#3 /var/www/helpdesk/hdz/app/Controllers/BaseController.php(71): App\Libraries\Settings->config()
#4 /var/www/helpdesk/hdz/framework/CodeIgniter.php(909): App\Controllers\BaseController->initController()
#5 /var/www/helpdesk/hdz/framework/CodeIgniter.php(969): CodeIgniter\CodeIgniter->createController()
#6 /var/www/helpdesk/hdz/framework/CodeIgniter.php(349): CodeIgniter\CodeIgniter->display404errors()
#7 /var/www/helpdesk/index.php(44): CodeIgniter\CodeIgniter->run()
#8 {main}
OUCH!
Solved ... I had to create manually the DB because I don't have an administrator user and mysql/mariaDB current, complains if you manage as root
Solution
I have manually created the database helpdeskz and then created and given admin privileges to some "helpdekdb" user