• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Roundcube 'CONFIGURATION ERROR'

Fritz MichaelG

Basic Pleskian
[solved] Roundcube 'CONFIGURATION ERROR'

I recently ran the Plesk Autoinstaller and added the Roundcube component (instead of only just Horde). Today I tried Roundcube for the first time on a domain, however, when I open the webmail domain (webmail.domain.com by default) it gives me the following error:
CONFIGURATION ERROR

main.inc.php was not found.
db.inc.php was not found.
Please read the INSTALL instructions!
The error that is shown on the console is

[Tue Oct 29 10:11:10 2013] [error] [client 80.110.33.177] MDB2 Error: not found (-4): no RDBMS driver specified

( http://forum.parallels.com/showthread.php?288559-Webmail&p=691661&viewfull=1#post691661 )

Not really sure what to do now, I didn't find to much info on this error (so far).
 
Last edited:
I found this Knowledge Base entry: http://kb.parallels.com/en/118265
However, the permissions for these file are exactly as shown in the KB entry. When I set the permissions to 644 (read for everyone too), Roundcube works.

But I'd rather find out why it doesn't work with the default permissions? Apparently the webserver for the webmail interface isn't run with the correct permissions (i.e. under the roundcube_sysgroup)?
 
Do you have SELinux enabled? Check /etc/httpd/conf/plesk.conf.d/roundcube.conf (or in similar location) for "SuexecUserGroup roundcube_sysuser roundcube_sysgroup" and "IfModule mod_fcgid.c" lines to make sure it runs under proper user/group via fcgid.
 
Do you have SELinux enabled?
No, or at least not as far as I know.


Check /etc/httpd/conf/plesk.conf.d/roundcube.conf (or in similar location) for "SuexecUserGroup roundcube_sysuser roundcube_sysgroup" and "IfModule mod_fcgid.c" lines to make sure it runs under proper user/group via fcgid.
These things are present in the roundcube.conf:
Code:
    <IfModule mod_suexec.c>
        SuexecUserGroup roundcube_sysuser roundcube_sysgroup
    </IfModule>

    <IfModule mod_fcgid.c>
            FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
            FcgidInitialEnv PP_CUSTOM_PHP_INI "/etc/psa-webmail/roundcube/php.ini"
            FcgidMaxRequestLen 134217728
        <Directory "/usr/share/psa-roundcube/">
            Options -Indexes FollowSymLinks
            AllowOverride FileInfo
            Order allow,deny
            Allow from all
            Include "/etc/apache2/plesk.conf.d/roundcube.htaccess.inc"

            <Files ~ (\.php$)>
                SetHandler fcgid-script
                FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
                Options +ExecCGI
            </Files>
        </Directory>
    </IfModule>
May be roundcube simply doesn't run under FastCGI, but as mod_php for example?
 
Nah... configuration looks just like it should. And it means it should run as fastcgi. Maybe Apache restart helps? I assume virtual host configuration (in the same configuration file) makes sense?

BTW, are there errors in /var/log/plesk-roundcube/error_log (or something like that - I don't remember exactly)?
 
Nah... configuration looks just like it should. And it means it should run as fastcgi. Maybe Apache restart helps? I assume virtual host configuration (in the same configuration file) makes sense?
Hm, restart didn't help. The Virtual Host Configuration should make sense, yes. However, I don't really get how the configuration is applied to specific domains (i.e., by default, you access the webmail interface via webmail.domain.com, but the vhost config in that file only has
Code:
<VirtualHost \
    123.123.123.123:80 \
        [0000:000:000:000::0]:80 \
         \
    >
for instance (+ config for SSL). There must be a config somehwere, that includes this domain, isn't there?


The directory /var/log/plesk-roundcube is present, however there are no logs in it (no error_log).
 
ServerName (or whatever) configs to have webmail for specific domains are under /etc/httpd/conf/plesk.conf.d/ (couple of levels below).
 
Thx, yes,

/etc/apache2/plesk.conf.d/webmails/roundcube/domain.com_webmail.conf

simply has

ServerAlias "webmail.domain.com"

in there. Hm... anything else I could check?
 
You may double-check permissions :) Should be 0640 root:roundcube_sysgroup. Also verify that roundcube_sysgroup group actually exists.
 
Well, that's my /usr/share/psa-roundcube/config folder:

/usr/share/psa-roundcube/config # ls -l
total 48K
-rw-r----- 1 root roundcube_sysgroup 2.9K Oct 23 10:51 db.inc.php
-rw-r----- 1 root roundcube_sysgroup 36K Aug 12 11:53 main.inc.php
-rw-r--r-- 1 root root 2.4K Aug 12 11:53 mimetypes.php
-rw-r--r-- 1 root root 441 Aug 12 11:53 php.ini.tpl


It's exactly as it should be as descried in the KB entry. And the roundcube_sysgroup group does indeed exist:

# cut -d: -f1 /etc/group
...
roundcube_sysgroup


Hm, what's the best way to check, whether anything on http://webmail.domain.com is actually exectued via FastCGI (and under which user and group)?
 
Ah, I created a phpinfo.php (with <?php phpinfo(); ?>) within /usr/share/psa-roundcube. When I call http://webmail.domain.com/phpinfo.php it shows me

Server API: Apache 2.0 Handler

Which means PHP is running as an Apache Module instead of CGI or FastCGI, isn't it? "Loaded Modules" also isn't showing mod_fcgid for example (only mod_cgi). But why and/or how can I switch it to CGI or FastCGI. From Plesk Panel I can only switch it for the main domain or other subdomains, but not for the Webmail Domain of course.

// well, I ran a2enmod fcgid (and server apache2 restart), now it works. Hm, still strange though.
 
Last edited:
Glad it worked out for you. So you just had mod_fcgid manually disabled?
Actually, no, I never manually disabled it. Just for some background info: I wasn't able to use FastCGI via the Plesk Panel in the Hosting Settings of a Subscription ( http://forum.parallels.com/showthread.php?291836-Cannot-use-FastCGI&p=704615&viewfull=1#post704615 ), until I ran the Plesk Autoinstaller again and selected the FastCGI Module there to be installed as well. However, mod_fcgid always was present before that as well and I already ran a2enmod fcgid at one point some time ago. So not sure what was going on here ;). As a side note: I also had some weird problems when I switched one domain from CGI to Apache Module and back again. Hosting for that domain didn't work anymore, I had to completely delete and recreate it again. I hope there aren't any hickups anymore!
 
Back
Top