Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database SSL setting lacks default value #4831

Closed
TheWitness opened this issue Jun 17, 2022 · 12 comments
Closed

Database SSL setting lacks default value #4831

TheWitness opened this issue Jun 17, 2022 · 12 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Milestone

Comments

@TheWitness
Copy link
Member

Describe the bug

If a user forget's to set $database_ssl = true|false, Cactid throws an error

Expected behavior

Less bugs

@TheWitness TheWitness added bug Undesired behaviour confirmed Bug is confirm by dev team labels Jun 17, 2022
@TheWitness TheWitness added this to the v1.2.22 milestone Jun 17, 2022
@TheWitness TheWitness added the resolved A fixed issue label Jun 17, 2022
TheWitness added a commit that referenced this issue Jun 17, 2022
Cactid lacks a default for $database_ssl
@cutehameed
Copy link

how to set $database_ssl = true|false ?

@TheWitness
Copy link
Member Author

In your config.php

@cutehameed
Copy link

@TheWitness Apologies! As i am newbie on linux. Kindly tell me complete file path so that i can edit via vim editor.

@TheWitness
Copy link
Member Author

In a normal install it's /var/www/html/cacti/include/config.php, for Debian, it might be something like /usr/share/site/cacti/include/config.php or it could even be in /etc/cacti.

@cutehameed
Copy link

@TheWitness ok, i have done with $database_ssl = 'false',

is it in correct format?

$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cacti_user';
$database_password = 'mypassword';
$database_ssl = 'false';

@cutehameed
Copy link

Still not working.... Still getting below error

CMDPHP PHP ERROR NOTICE Backtrace: (/cactid.php[150]:db_check_reconnect(), /cactid.php[268]:CactiErrorHandler())
ERROR PHP NOTICE: Undefined variable: database_retries in file: /var/www/html/cacti/cactid.php on line: 268

@TheWitness
Copy link
Member Author

That's a real old format config.php. You need to use the config.php.dist from the upgrade/install and redo yours.

@cutehameed
Copy link

@TheWitness Sorry unable to understand. Should i change config.php.dist?

@cutehameed
Copy link

@TheWitness is it possible to install old version of cacti in ubuntu 20?

@cutehameed
Copy link

@TheWitness I will appericiate and request you to take me on board via anydesk and help me to get rid of the issue.

@TheWitness
Copy link
Member Author

Read the documentation on how to install Cacti. It's not that complicated.

@cutehameed
Copy link

ok. thanks alot for support. issue stands resolved.

TheWitness added a commit that referenced this issue Jun 21, 2022
Changing the default to match `global.php`.  This function should likely be moved to lib/database.php for others daemonizing Cacti binaries.
@netniV netniV changed the title Cactid lacks a default for $database_ssl Database SSL setting lacks default value Aug 14, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants