Hello, I’m new to hestia. I just setup a server and had some issue with the roundcube installation/webmail panel. I followed one of the instructions to use apt-get to reinstall roundcube but that looks to have deleted the database.
I have not found a way to reinstall roundcube and reinitialize the service. Is there docs or instructions on how to do so?
The error I have is:
DATABASE ERROR!
Unable to connect to the database!
Please contact your server-administrator.
You should not install roundcube using apt, if you did it remove it.
apt remove roundcube
As I don’t know what you did, just in case it exists, delete db, db user and one file in roundcube installation (Hestia script v-add-sys-roundcube will remove all later):
mysql -uroot -e 'DROP DATABASE IF EXISTS roundcube'
mysql -uroot -e 'DROP USER 'roundcube'@'localhost''
rm /var/lib/roundcube/index.php
root@admin:/usr/local/hestia/web# v-add-sys-roundcube
PHP Fatal error: Uncaught Error: Class “PHPMailer\PHPMailer\PHPMailer” not found in /usr/local/hestia/web/inc/main.php:434
Stack trace: #0 /usr/local/hestia/web/inc/mail-wrapper.php(39): send_email() #1 {main}
thrown in /usr/local/hestia/web/inc/main.php on line 434
Error: Connection to localhost failed
If MySQL is not working, would the wordpress system be working? It must be something else. When I checked status I didn’t see a problem, where else can I check?
No, I’m still using my old password. Two days ago, the server company crashed due to a malfunction and I took backups and formatted it. Then I reinstalled everything, but the mail system didn’t work, connection problems, etc. I got a lot of errors. It took a lot of time to try to solve it, so I decided to take backups again and format it, but I’m having trouble taking backups. In the other issue I opened, there is an error I got during the backup process, it says something like MySQL connection could not be established. But the web pages can pull data from the database, I honestly don’t fully understand the problem.
The only thing I did differently in the last format was that I included postgreesql as an extra when installing hestia. I wonder if this will cause problems? All other settings are the same, hostname, password, port and others
today i reformatted the server and uploaded the backups. i didn’t get any problems everything works but roundcube is not working again. i checked the logs but the folder is empty there are no files.
there you will find the error
In my case it was
‘PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247’
SOLUTION
set the right permissions for file /etc/roundcube/defaults.inc.php chmod 755 defaults.inc.php
I must thank you for your tutorial. When I first installed HestiaCP on my Ubuntu 22.04 LTS, everything worked except webmail. After, I implemented your tutorial, webmail works fine