Roundcube error config.inc.php

Mitya1987

Verified User
Joined
Aug 23, 2021
Messages
19
Hi, can you tell me how to fix this problem, when I open roundcube then, I get to the page with an error.

Скриншот 01-12-2021 021928.jpg
 
Try to reinstall roundcube again via SSH as root:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build roundcube

After that, check if config.inc.php is present in:
/var/www/html/roundcubemail-1.5.1/config/config.inc.php
 
Hi, I already reinstalled but it didn't help, can you tell me what exactly I should find in this file?
 
Very odd. Check your owner and permissions on the /var/www/html directory.

It may also be /roundcubemail-1.5.0/ and so on. There must be multiple files in that directory.
Should also be reachable by visiting the /var/www/html/roundcube/config directory.

It's no use to post this file here. If this is not present there or in /var/www/html/roundcube/config/ then probably more is wrong. It's part of Roundcube and starts like this:
Code:
<?php

/*
 +-----------------------------------------------------------------------+
 | Local configuration for the Roundcube Webmail installation.           |
 |                                                                       |
 | This is a sample configuration file only containing the minimum       |
 | setup required for a functional installation. Copy more options       |
 | from defaults.inc.php to this file to override the defaults.          |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) The Roundcube Dev Team                                  |
 |                                                                       |
 | Licensed under the GNU General Public License version 3 or            |
 | any later version with exceptions for skins & plugins.                |
 | See the README file for a full license statement.                     |
 +-----------------------------------------------------------------------+
*/

$config = [];

// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
//       or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysql://da_roundcube:password@localhost/da_roundcube';
and a lot more.
 
/var/www/html/roundcubemail-1.5.1/config/config.inc.php I checked this file has this information.
 
First try this:
chown webapps:webapps /var/www/html/roundcube -R

Check if ownership of config.inc matches and see if that fixes things.
There should be a bunch of other files in that directory including a my.cnf file.

If not, maybe a total fresh install is necessary, so remove roundcube etc. and build again.

You can find instructions here (click), so I don't have to type them all. :)
 
I did the operation and it didn't fix the situation. Of all the files that should be in the directory is missing only file .htaccess, or his system just does not show. Tell me if this error can be because I changed the hostname.
 
I don't know how you're looking, it's a hidden file and should be shown when using the "ls -all" command.

This is the content of the .htaccess file:
Code:
# deny webserver access to this directory
<ifModule mod_authz_core.c>
    Require all denied
</ifModule>
<ifModule !mod_authz_core.c>
    Deny from all
</ifModule>

I suggest you try removing and totally new installation of roundcube as shown in the link under the word "here" in my previous message.
If that does not work, you might need somebody else to help you fix this or send in a ticket.

There might be some influence because of the hostname change but I'm not sure. You might need a reboot too.
 
I did as you pointed out in the link to the instructions. All the files are in the directory.
Thank you for the advice I appreciate it! But the problem is still there! ((

[root@server ~]# ls -all /var/www/html/roundcube/config/
total 152
drwxr-xr-x 2 webapps webapps 4096 Nov 30 18:43 .
drwxr-xr-x 13 webapps webapps 4096 Nov 30 18:43 ..
-r--r----- 1 webapps webapps 4676 Nov 30 18:43 config.inc.php
-rw-r--r-- 1 webapps webapps 4118 Nov 22 21:12 config.inc.php.sample
-rw-r--r-- 1 webapps webapps 62578 Nov 22 21:12 defaults.inc.php
-rw-r--r-- 1 webapps webapps 164 Nov 22 21:12 .htaccess
-rw-r--r-- 1 webapps webapps 50737 Nov 30 17:15 mime.types
-rw-r--r-- 1 webapps webapps 2806 Nov 22 21:12 mimetypes.php
-rw------- 1 webapps webapps 52 Nov 30 18:43 my.cnf
 
My assumption would be that your /roundcube URL is not using the installation in /var/www/html/roundcube. If you've installed software outside of DA's own methods you may have ended up with something conflicting somewhere. My immediate thoughts go to something like a roundcube install from the OS repos with a web server include that overrides /roundcube for all URLs. I'm flying pretty theoretical here without direct access to the system, and frankly if you have an admin that knows everywhere to look I would recommend that you turn them loose on the box and see what they find. But off the top of my head, I'm wondering if this returns anything:

Code:
find /etc -name "*roundcube*"

It's a rough theory and that not finding anything doesn't mean that I'm wrong, doesn't mean I'm right either. But if you have the config.inc.php file in that directory and you're getting that error, I think it's a fairly clear statement that you're not loading that version of Roundcube. At least, that's the conclusion I'd place my bet on.
 
I am not sure I did ever a manual installation for Roundcube. I do always work with CB. After removing Roundcube from CB /roundcube gives a 404. When I do a install again, I see config.inc.php error. The problem is I can't find the installer folder, so this part of the installation is not working.

This instance of Roundcube is not yet configured!
Open http://url-to-roundcube/installer/ in your browser and follow the instructions.
Done!
 
Last edited:
Your logic seems sound, I don't think you've done anything to break it. This seems worthy of a ticket to the DA team.
 
I fixed it! After building again, I opened /var/www/html/roundcube/config/config.inc.php, used the content from config.inc.php.sample and pasted the code generated in the building log to replace the dummy text with this part;

$config['db_dsnw'] = 'mysql://da_roundcube:XXXXX@localhost/da_roundcube';

I totally don't understand what was going wrong, but it did the trick. Roundcube is loading again.
 
Last edited:
I fixed it! After building again, I opened /var/www/html/roundcube/config/config.inc.php, used the content from config.inc.php.sample and pasted the code generated in the building log to replace the dummy text with this part;

$config['db_dsnw'] = 'mysql://da_roundcube:XXXXX@localhost/da_roundcube';

I totally don't understand was going wrong, but it did the trick. Roundcube is loading again.

Appreciate you following up with the resolution. While I haven't yet experienced it, it does sound like a problem with Custombuild. If I run into it similarly I'll make sure to open a ticket with them.
 
If I run into it similarly I'll make sure to open a ticket with them.
Yes because in post #5 it was confirmed that the file had this information. So I presumed the correct password was present.

So it seems custombuild does build Roundcube, but does not copy the correct content into the config.inc.php file.
Thank you for posting back your solution @toktokcity.

Does this solution also work for you as topic starter @Mitya1987 or do you still encounter issues?
 
Back
Top