Roundcube Community Forum

 

Tons of errors on latestest version

Started by Gorf, December 22, 2009, 12:48:51 AM

Previous topic - Next topic

Gorf

So I finally managed to get Roundcube installed and I get a ton of errors on the main page:

Warning: Error writing to log file /home/*user*/public_html/whootis.net/www/logs/errors; Please check permissions in /home/*user*/public_html/whootis.net/www/webmail/program/include/main.inc on line 1053

Notice: MDB2 Error: unknown error Query: _execute: [Error message: Unable to execute statement] [Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES (?, ?, ?, FROM_UNIXTIME(1261460620), FROM_UNIXTIME(1261460620))] [Native code: 0] in /home/*user*/public_html/whootis.net/www/webmail/program/include/bugs.inc on line 86
DB Error in /home/*user*/public_html/whootis.net/www/webmail/program/include/rcube_mdb2.php (627): MDB2 Error: unknown error Query: _execute: [Error message: Unable to execute statement] [Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES (?, ?, ?, FROM_UNIXTIME(1261460620), FROM_UNIXTIME(1261460620))] [Native code: 0]

I've given up trying to make the logs work.  As a temporary work around I am now just sending them to /tmp and that works.  However I can not get rid of these other SQL errors at all.  Any thoughts?

System:
CentOS 5.4 i386
Apache 2.2
PHP 5.3.1

rosali

The first error is a permission issue. Apache user does not have write permission on logs folder.

Did you update your database tables? There are SQL scripts in the SQL folder. May be the installer script failed to do the job due to the permission issue on logs folder.
Regards,
Rosali

Gorf

#2
This is a brand new installation.  

The logs and temp write issue are specifically a RoundCube issue.  Several attempts to reproduce the issue in my own code are not successful.  I can readily write to the exact same path with my own code without issue.

In fact, if I take the code throwing the error for the logs and run it on my own I have zero issues.  However the exact same code in RoundCube throws the error:


    
// log_driver == 'file' is assumed here
    
if (empty($CONFIG['log_dir']))
      
$CONFIG['log_dir'] = INSTALL_PATH.'logs';

    
// try to open specific log file for writing
    
$logfile $CONFIG['log_dir'].'/'.$name;
    if (
$fp = @fopen($logfile'a')) {
      
fwrite($fp$log_entry);
      
fflush($fp);
      
fclose($fp);
      return 
true;
    }
    else
      
trigger_error("Error writing to log file $logfile Please check permissions"E_USER_WARNING);



As for the database, I will try to redo the install clean again and re-route the temp and logs to /tmp where apparently the RoundCube code can write and see if that makes a difference.

Gorf

I'll be damned.

I redid the install from scratch and everything appears to be hunky-dory now.

*shrug*

Thanks for the help anyway!

neurox

Changing DSN from "mysqli" to "mysql" fixed the MDB2 errors for me.

SKaero

That would only work if your using a mysqli database.

alec

PHP5.3 + mysqli = known problem, but no solution yet. Consider giving me ssh access to your box and I will try to fix this. Currently I'm not using PHP5.3.