Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

https://domain.com/webmail gives http 500 error

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
17 posts
  • 1
  • 2
  • Next
SanTi
Posts: 39
Joined: Tue Jan 08, 2019 1:23 am

Os: CentOS 6x
Web: nginx + php-fpm
https://domain.com/webmail gives http 500 error
  • Quote

Post by SanTi » Sun Jun 21, 2020 5:16 am

I can not enter to roundcube mail server on my VPS. I could not solve the problem. It looks like a database related problem but I dont know exactly what

Log error

Code: Select all

PHP message: PHP Warning:  file_put_contents(/usr/share/errors.log): failed to open stream: Permission denied in /usr/share/roundcubemail/program/lib/Roundcube/rcube.php on line 1308 PHP message: PHP Warning:  Configuration error. Unsupported database driver:  in /usr/share/roundcubemail/program/lib/Roundcube/rcube.php on line 1419

This is my /etc/roundcubemail/config.inc.php file

Code: Select all

<?php

$config = array();
$config['db_dsnw'] = 'mysql://roundcube:OPsv4......@localhost/roundcube';
$config['default_host'] = 'localhost';

$config['smtp_server'] = '';
$config['smtp_port'] = 25;
$config['smtp_user'] = '';
$config['smtp_pass'] = '';
$config['support_url'] = '';

$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
$rcmail_config['temp_dir'] = '/tmp';
$rcmail_config['force_https'] = false;
$rcmail_config['use_https'] = false;
$rcmail_config['login_autocomplete'] = 0;
$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['junk_mbox'] = 'Spam';
$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Spam', 'Trash');
$rcmail_config['create_default_folders'] = true;
$rcmail_config['protect_default_folders'] = true;
$rcmail_config['enable_spellcheck'] = true;
$rcmail_config['spellcheck_dictionary'] = false;
$rcmail_config['spellcheck_engine'] = 'googie';
$rcmail_config['default_charset'] = 'UTF-8';
$rcmail_config['delete_junk'] = true;

$config['product_name'] = 'Roundcube Webmail';
$config['des_key'] = 'rcmail-!24ByteDESkey*Str';

$config['plugins'] = array(
    'archive',
    'zipdownload',
    'password',
);

$config['skin'] = 'larry';
Top

peters
Posts: 29
Joined: Thu Jun 18, 2020 9:05 am

Os: CentOS 6x
Web: apache + nginx
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by peters » Sun Jun 21, 2020 3:39 pm

This seems like a file permission problem as you can read from the error message. Check your file permissions within /usr/share/roundcubemail (all files should be owned by root and file permissions should be 644)
Top

SanTi
Posts: 39
Joined: Tue Jan 08, 2019 1:23 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by SanTi » Sun Jun 21, 2020 4:15 pm

All of them has that permission. Folder has 755 and files 644. I have created errors.log by manual inside of /usr/share and now it gives database error now.

I can use webmail before upgrade. Now it gives me DB error.

Code: Select all

/usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php
84 line gives error.

Code: Select all

    public static function factory($db_dsnw, $db_dsnr = '', $pconn = false)
    {
        $driver     = strtolower(substr($db_dsnw, 0, strpos($db_dsnw, ':')));
        $driver_map = array(
            'sqlite2' => 'sqlite',
            'sybase'  => 'mssql',
            'dblib'   => 'mssql',
            'mysqli'  => 'mysql',
            'oci'     => 'oracle',
            'oci8'    => 'oracle',
        );

        $driver = isset($driver_map[$driver]) ? $driver_map[$driver] : $driver;
        $class  = "rcube_db_$driver";

        if (!$driver || !class_exists($class)) {
            rcube::raise_error(array('code' => 600, 'type' => 'db',
                'line' => __LINE__, 'file' => __FILE__,
                'message' => "Configuration error. Unsupported database driver: $driver"),
                true, true);
        }

        return new $class($db_dsnw, $db_dsnr, $pconn);
    }
line 84 gives error.

Code: Select all

'line' => __LINE__, 'file' => __FILE__,
                'message' => "Configuration error. Unsupported database driver: $driver"),
Top

peters
Posts: 29
Joined: Thu Jun 18, 2020 9:05 am

Os: CentOS 6x
Web: apache + nginx
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by peters » Sun Jun 21, 2020 4:37 pm

Could you verify that php-sql is installed properly?
Top

SanTi
Posts: 39
Joined: Tue Jan 08, 2019 1:23 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by SanTi » Sun Jun 21, 2020 7:55 pm

My Mariadb version 10.4.13-MariaDB

Image


My php version 7.4.7

Image


webmail installer check status

Image
Top

peters
Posts: 29
Joined: Thu Jun 18, 2020 9:05 am

Os: CentOS 6x
Web: apache + nginx
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by peters » Sun Jun 21, 2020 9:04 pm

Could also be a problem with suexec. Is there something in /var/log/httpd/suexec.log ? Are you able to connect to the roundcube database from the command line through mysql console?

Slightly I'm running out of ideas and suggest to reinstall the VPS from scratch and give it a try if thats possible.
Top

SanTi
Posts: 39
Joined: Tue Jan 08, 2019 1:23 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by SanTi » Sun Jun 21, 2020 9:21 pm

I don't use Apache. I use nginx and the problem is not about it. Also changes on my config.inc.php file at /etc/roundcube/ does not effect anything. Is it active of inactive? I don't know. Reisntallinh and carrying all files etc. is very boring solve.
Top

peters
Posts: 29
Joined: Thu Jun 18, 2020 9:05 am

Os: CentOS 6x
Web: apache + nginx
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by peters » Sun Jun 21, 2020 9:26 pm

SELinux disabled?
Top

SanTi
Posts: 39
Joined: Tue Jan 08, 2019 1:23 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by SanTi » Sun Jun 21, 2020 9:50 pm

How can I learn it?

I used "getenforce" and it says permissive.
Top

peters
Posts: 29
Joined: Thu Jun 18, 2020 9:05 am

Os: CentOS 6x
Web: apache + nginx
Re: https://domain.com/webmail gives http 500 error
  • Quote

Post by peters » Sun Jun 21, 2020 9:52 pm

Log in to your server

Check the current SELinux status, run: sestatus

To disable SELinux on CentOS 7 temporarily, run: sudo setenforce 0

Edit the /etc/selinux/config file and set the SELINUX to disabled

Reboot the Linux server
Verify it by running the sestatus and getenforce again
Top


Post Reply
  • Print view

17 posts
  • 1
  • 2
  • Next

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password