Welcome to Pandora FMS Community › Forums › Community support › Install on CentOS 8 error after first reboot
-
Install on CentOS 8 error after first reboot
Posted by Pierre on December 1, 2020 at 19:01hello everyone,
I have a server Pandora FMS v7.0NG.715 OpenSuse 42 Leap.
I try to install Pandora 750 on Centos 8 with this doc:
https://pandorafms.com/docs/index.php?title=Pandora:Documentation_en:Installing#Package_installation_for_CentOS_7.2F8
At the end everythings is ok but if I restart the server, I have this error :
Problem with Pandora FMS databaseCannot connect to the database, please check your database setup in the include/config.php file.
For test, I didn’t change password and config.
My includr/config.php file:
$config[“dbtype”] = “mysql”;
$config[“dbname”]=”$DBNAME”;
$config[“dbuser”]=”$DBUSER”;
$config[“dbpass”]=”$DBPASS”;
$config[“dbhost”]=”$DBHOST”;
$config[“homedir”]=”/var/www/html/pandora_console”;
$config[“homeurl”]=”/pandora_console”;
error_reporting(0);
$ownDir = dirname(__FILE__) . ‘/’;
include ($ownDir . “config_process.php”);do you have an idea how to solve this problem?
Thank you.
davidbaker123 replied 3 years, 9 months ago 3 Members · 4 Replies -
4 Replies
-
::
Hello,
There are several checks to know what is failing you in the PandoraFMS DB connection. Next I detail them, check them by order if possible.
1) Check that mysql is up and running.
2) Try to access manually to mysql to the PandoraFMS DB and with its user.
3) Check the permissions, user and group of the file config.php, it must be 600 apache:apache.
4) If you have configured the config.php with environment variables, check that the variables have the correct information, for that you can execute “echo $DBNAME” and check each one of the variables.
5) Finally and what I think less likely is that the path of the config.php is wrong, so I see you have put that the path is includr/config.php, but is include/config.php, but I understand that this will be a simple error when writing.
Greetings
Diego -
::
Hello,
There are several checks to know what is failing you in the PandoraFMS DB connection. Next I detail them, check them by order if possible.
1) Check that mysql is up and running.
2) Try to access manually to mysql to the PandoraFMS DB and with its user.
3) Check the permissions, user and group of the file config.php, it must be 600 apache:apache.
4) If you have configured the config.php with environment variables, check that the variables have the correct information, for that you can execute “echo $DBNAME” and check each one of the variables.
5) Finally and what I think less likely is that the path of the config.php is wrong, so I see you have put that the path is includr/config.php, but is include/config.php, but I understand that this will be a simple error when writing.
Greetings
DiegoHello,
Thanks for your reply,
1) mysqld Active and running
2) Accès to pandora database with command line ok
3) Permissions for /include/config.php ok
4) Environment variables: they are all empty.
Apparently this is normal after a reboot on linux
I retryed the mysql and php configuration parts without environment variable but the problem persists.5) it’s a writing error, sorry.
-
::
Hello,
I recommend that you don’t use the environment variables if they can give you this kind of problems. Instead write the data directly in the config.php. I understand that this is what you have done and that it is also giving you errors, my advice is to double check the data entered in the config.php and after editing it look again at the permissions of the file, especially the user and group, as it may have been modified when editing the file.
Check also that the data introduced in the config.php match with the ones in the pandora_server.conf
In case after this the problem persists, please send us the content of the config.php file so we can check that there is no error in its format and also send us the content of the pandora_server.log file so we can see if this clarifies the origin of the problem.
Greetings
Diego -