Roundcube - How to log to file?

Greetings,
I ran into some problem I can´t solve by myself and for which I can´t find any fitting solution. What I have: A virtual domain Mailserversetup with FreeBSD 11, postfix 2.11, Dovecot 2.2, MariaDB 5.5 and NGinx 1.12 and php 5.6. The setup itself works fine but now I want to be able to change passwords from within Roundcube. I have found several howtos (including the one here on the forum) but none of it works. To find out where it all fails I´ve tried to enable debug logging within Roundcube. I have tried both syslog and file but nothing in the system or maillogs, no log files were written to disk, even for simple tasks like log in. Made my way through the config files to create all the subdirectories, checked the the file and folder permissions, still no fix. If anybody could help me with a little hint I would be very gradeful.
Best regards,

Mike
 
You can configure this in /config/defaults.inc.php


Code:
// ----------------------------------

// LOGGING/DEBUGGING

// ----------------------------------

// system error reporting, sum of: 1 = log; 4 = show

$config['debug_level'] = 1;
....
....
....
 
In addition to what gkontos said, make sure that the log files/directories have the correct permissions as the http server (assuming your not using syslog hooks).
 
Hi,
thanks for the reply.
To gkontos: yes, I´ve tried that already, after it failed I have created a config.inc.php as mentioned at some other source to put it there. Here it is:
Code:
$config['debug_level'] = 1;
$config['sql_debug'] = true;
$config['imap_debug'] = true;
$config['smtp_debug'] = true;
To pboehmer: While www is not the owner of the subdirectories the www group has at least full access to the folders in the logs/ folder. Here is the listing:
Code:
drwxrwxr-x  2 root  www errors
drwxrwxr-x  2 root  www imap
drwxrwxr-x  2 root  www memcache
drwxrwxr-x  2 root  www sendmail
drwxrwxr-x  2 root  www session
drwxrwxr-x  2 root  www smtp
drwxrwxr-x  2 root  www sql
drwxrwxr-x  2 root  www userlogins
Could anybody see something within that I´m too blind to see? Really fighting some time with this problem...

Best regards,

Mike
 
How about, which is probably a gimme, but just making sure:

Code:
// use this folder to store log files (must be writeable for apache user)
// This is used by the 'file' log driver.
$config['log_dir'] = 'logs/';

I also noticed that I do not have separate directories for each "type" of log file, just:

Code:
-rw-r--r--  1 root  wheel       164 Nov  8 13:42 .htaccess
-rw-r--r--  1 www   www    78725874 Feb  6 08:58 errors
-rw-r--r--  1 www   www    11819926 Feb  6 10:46 sendmail
-rw-r--r--  1 www   www    36490554 Feb  6 10:46 userlogins

Is your mail/roundcube installed from ports/pkg?
 
Hi,
thought about that too, but stayed with the line in defaults.inc.php portmaster did install:
Code:
$config['log_dir'] = RCUBE_INSTALL_PATH . 'logs/';
I didn´t wanted to alter too much while I´m a little bit affraid to make a total mess of an otherwise working installation. Should this line work?

Best regards,

Mike
 
You'd think :) Honestly, I'm looking at the configs and I don't see RCUBE_INSTALL_PATH defined anywhere (maybe sourced from SQL?). Nevertheless, I have my log and temp directories defined in my config.inc.php. If your errors directory is empty, I'd remove it, touch it, and then set permissions and see if that works for you.
 
Hi,
You'd think :) Honestly
Thanks for that. But not hard enough of my usual ways to handle things or even take a look at my documentation. But your response triggers something in my head so I owe you a beer!
What is it? As I mentioned before the server is holding diffent domains and applications. Webapps like roundcube are installed via the port system but from there they are copied to the subfolders of the domains where they are needed - so I have a chance to test new versions on a test domain before rolling them out to production domains. And -sure enough- trying the mentioned changes in config.inc.php and defaults.inc.php of the domain started the logging and brings me one step closer to fix the main problem.

Thanks a lot and best regards,

Mike
 
Back
Top