Author Topic: [0.9 beta] DB check fails with "Fatal error: Class 'rcube_db_' not found"  (Read 31737 times)

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
Hi all,
I just wanted to give 0.9 beta a try and put it in some new dir under /var/www/, adjusted the Apache config to use the new directory, copied the dp.inc.php and main.inc.php and ran the installer.
Step 1 and 2 went smoothly, but DB config check fail:
Code: [Select]
( ! ) Fatal error: Class 'rcube_db_' not found in /var/www/mail-0.9/program/lib/Roundcube/rcube_db.php on line 80
Call Stack
# Time Memory Function Location
1 0.0003 133752 {main}( ) ../index.php:0
2 0.0141 313996 include( '/var/www/mail-0.9/installer/test.php' ) ../index.php:156
3 0.0343 327440 rcube_db::factory( ) ../test.php:128

Well - let's say, I'm not talking PHP, and I'm a bit lost to what to do with this one?!?

I'd appreciate a little help :-D




Some info about my setup:
Ubuntu Server 10.04 with a number of backports and PPAs, Apache 2.2, MySQL 5.1.67 and the following PHP related packages:
Code: [Select]
ii  libapache2-mod-php5                  5.4.11-1~lucid+1                             server-side, HTML-embedded scripting language (Apache 2 module)
ii  libphp-phpmailer                     5.1-1                                        full featured email transfer class for PHP
ii  libphp-simplepie                     1.2-1                                        RSS and Atom feed parsing in PHP
ii  libphp-snoopy                        1.2.4-1                                      Snoopy is a PHP class that simulates a web browser
ii  libssh2-php                          0.11.3-0.1build1                             PHP Bindings for libssh2
ii  pear-phpunit-channel                 1.1-1                                        PEAR pear.phpunit.de channel definition file
ii  php-apc                              3.1.13-1~lucid+1                             APC (Alternative PHP Cache) module for PHP 5
ii  php-auth                             1.6.2-1ubuntu1                               PHP PEAR modules for creating an authentication system
ii  php-auth-sasl                        1.0.3-1                                      Abstraction of various SASL mechanism responses
ii  php-codecoverage                     1.1.2+dfsg1-3                                provides collection, processing and rendering for PHP code coverage information
ii  php-crypt-blowfish                   1.1.0~RC2-1                                  Allows for quick two-way blowfish encryption without requiring the MCrypt PHP extension
ii  php-crypt-gpg                        1.0.0-2                                      PHP PEAR module for encrypting and decrypting with GnuPG
ii  php-file-iterator                    1.3.1-2                                      FilterIterator implementation for PHP
ii  php-getid3                           1.9.3-1+ppa10.04+1                           PHP script to extract informations from multimedia files
ii  php-log                              1.10.0-1                                     Log module for PEAR
ii  php-mail-mime                        1.8.4-1                                      PHP PEAR module for creating MIME messages
ii  php-mail-mimedecode                  1.5.0-3                                      PHP PEAR module to decode MIME messages
ii  php-mdb2                             2.5.0b2-1                                    PHP PEAR module to provide a common API for supported RDBMS
ii  php-mdb2-driver-mysql                1.5.0b2-1                                    PHP PEAR module to provide a MySQL driver for MDB2
ii  php-mdb2-schema                      0.8.5-1ubuntu1~ppa1~p                        XML based database schema manager
ii  php-net-sieve                        1.3.2-1~ppa10.04+1                           net_sieve module for PEAR
ii  php-net-smtp                         1.6.1-1                                      PHP PEAR module implementing SMTP protocol
ii  php-net-socket                       1.0.9-2                                      PHP PEAR Network Socket Interface module
ii  php-pear                             5.4.11-1~lucid+1                             PEAR - PHP Extension and Application Repository
ii  php-sabredav                         1.6.2-3~ppa10.04+1                           SabreDAV allows you to easily add WebDAV support to a PHP application
ii  php-symfony-yaml                     1.0.6-1                                      Symfony YAML: A PHP library that speaks YAML
ii  php-text-template                    1.1.1-2                                      Simple php template engine
ii  php-timer                            1.0.2-2                                      PHP Utility class for timing
ii  php-token-stream                     1.1.3-2                                      Wrapper around PHP's tokenizer extension
ii  php-xml-dtd                          0.5.2+dfsg1-1                                parsing of DTD files and DTD validation of XML files
ii  php-xml-parser                       1.3.0-1                                      PHP PEAR module for parsing XML
ii  php-xml-serializer                   0.20.0-2                                     swiss-army knife for reading and writing XML files
ii  php5                                 5.4.11-1~lucid+1                             server-side, HTML-embedded scripting language (metapackage)
ii  php5-cli                             5.4.11-1~lucid+1                             command-line interpreter for the php5 scripting language
ii  php5-common                          5.4.11-1~lucid+1                             Common files for packages built from the php5 source
ii  php5-curl                            5.4.11-1~lucid+1                             CURL module for php5
ii  php5-dev                             5.4.11-1~lucid+1                             Files for PHP5 module development
ii  php5-gd                              5.4.11-1~lucid+1                             GD module for php5
ii  php5-intl                            5.4.11-1~lucid+1                             internationalisation module for php5
ii  php5-mcrypt                          5.4.11-1~lucid+1                             MCrypt module for php5
ii  php5-memcache                        3.0.6-5~lucid+1                              memcache extension module for PHP5
ii  php5-mysql                           5.4.11-1~lucid+1                             MySQL module for php5
ii  php5-pspell                          5.4.11-1~lucid+1                             pspell module for php5
ii  php5-xdebug                          2.2.1-1~lucid+1                              Xdebug Module for PHP 5
ii  php5-xsl                             5.4.11-1~lucid+1                             XSL module for php5
ii  phpmyadmin                           4:3.3.2-1ubuntu1                             MySQL web administration tool
ii  phpsysinfo                           3.0.17-1ubuntu1                              PHP based host information
ii  phpunit                              3.6.10-1                                     Unit testing suite for PHP5
ii  phpunit-mock-object                  1.1.1-2                                      Mock Object library for PHPUnit
ii  pkg-php-tools                        0.5~ppa10.04+1                               various packaging tools and scripts for PHP PEAR packages

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
RoundCube 0.9.x requires PHP PDO.

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
In Ubuntu distro PDO comes with php5-mysql, and according to phpinfo() it is enabled:
Code: [Select]
PDO

PDO support enabled
PDO drivers mysql

pdo_mysql

PDO Driver for MySQL enabled
Client API version 5.1.67

Directive Local Value Master Value
pdo_mysql.default_socket /var/run/mysqld/mysqld.sock /var/run/mysqld/mysqld.sock

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,849
What is the value of db_dsnw in your db config file? Specifically the first bit like mysql://
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
Here's the first two paragraphs of db.inc.php:

Code: [Select]
<?php

/*
 +-----------------------------------------------------------------------+
 | Configuration file for database access                                |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2009, The Roundcube Dev Team                       |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

*/

$rcmail_config = array();
/* Do not set db_dsnw here, use dpkg-reconfigure roundcube-core to configure database ! */

include_once("/etc/roundcube/debian-db.php");

switch (
$dbtype) {
 case 
"sqlite":
   
$rcmail_config['db_dsnw'] = "sqlite:///$basepath/$dbname?mode=0640";
   break;                                                                                                                                    
 default:                                                                                                                                    
   if (
$dbport != ''$dbport=":$dbport";                                                                                                    
   if (
$dbserver == ''$dbserver="localhost";                                                                                               
   
$rcmail_config['db_dsnw'] = "$dbtype://$dbuser:$dbpass@$dbserver$dbport/$dbname";                                                         
   break;                                                                                                                                    
 }

and this is /etc/roundcube/debian-db.php:
Code: [Select]
<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/roundcube.conf
## by /usr/sbin/dbconfig-generate-include
## Wed, 22 Aug 2012 23:12:13 +0200
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='roundcube';
$dbpass='XXXXXXXXXX';
$basepath='';
$dbname='XXXXXXXXXX';
$dbserver='';
$dbport='';
$dbtype='mysql';

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,849
hmmm thats very strange indeed. did you start off with the debian package and then try and update to 0.9-beta yourself and not update the config files?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
Yep. And the very same config files do work with my RC 0.8.4 installation in a different directory.  ??? (in fact it's a symlink)

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
hmmm thats very strange indeed. did you start off with the debian package and then try and update to 0.9-beta yourself and not update the config files?
That sounds like I'd better generate a new config file? Or are there modifications to be made, e.g. with the DB structure? I tried to use the bin/installto.sh for 0.8.5, but it kept telling me my old installation wasn't configured yet. Is that because of the debian-db.php?

In order to get a nice and easy start I now made a copy of my 0.8.4-installation, deleted bin/, SQL/ and program/ as suggested in the file UPGRADING and tried to access the installer via webinterface - to no avail:

Code: [Select]
( ! ) Strict standards: Non-static method PEAR::setErrorHandling() should not be called statically in /var/www/mail-0.9/installer/utils.php on line 70
Call Stack
# Time Memory Function Location
1 0.0034 152776 {main}( ) ../index.php:0
2 0.0056 159496 require_once( '/var/www/mail-0.9/installer/utils.php' ) ../index.php:56

( ! ) Warning: require_once(main.inc): failed to open stream: No such file or directory in /var/www/mail-0.9/installer/index.php on line 57
Call Stack
# Time Memory Function Location
1 0.0034 152776 {main}( ) ../index.php:0

( ! ) Fatal error: require_once(): Failed opening required 'main.inc' (include_path='/var/www/mail-0.9/program/lib:/var/www/mail-0.9/program:/var/www/mail-0.9/program/include:.:/usr/share/php:/usr/share/pear') in /var/www/mail-0.9/installer/index.php on line 57
Call Stack
# Time Memory Function Location
1 0.0034 152776 {main}( ) ../index.php:0
I don't get any chance to enter any steps, this comes after invoking http://domain.tld/installer/, and there's no buttons to go anywhere. let alone any steps.

OK, I thought, there's still an other way - so I ran bin/update.sh. But - same problems here:
Code: [Select]
root@fitpc:/var/www/mail-0.9# bin/update.sh
PHP Warning:  Module 'apc' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: apc.shm_segments setting ignored in MMAP mode in Unknown on line 0
What version are you upgrading from? Type '?' if you don't know.
0.8.4
PHP Fatal error:  Class 'rcube_db_' not found in /var/www/mail-0.9/program/lib/Roundcube/rcube_db.php on line 80
PHP Stack trace:
PHP   1. {main}() /var/www/mail-0.9/bin/update.sh:0
PHP   2. rcube_db::factory() /var/www/mail-0.9/bin/update.sh:146

I'm lost here - any hints anyone?

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Quote
Code: [Select]
2 0.0056 159496 require_once( '/var/www/mail-0.9/installer/utils.php' ) ../index.php:56
This means you have installer/index.php file not from 0.9-beta version. There's no utils.php file in 0.9.

Quote
Code: [Select]
PHP Fatal error:  Class 'rcube_db_' not found in /var/www/mail-0.9/program/lib/Roundcube/rcube_db.php on line 80
This means there's no database connection setting in config/db.inc.php, however this should be handled by if() before line 80, so something is fucked up here too.

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
OK, I replaced the installer from 0.8.4 with the 0.9 version. Installer steps 1 and 2 pass without hassles (step is omitted because of existing main.inc.php I guess), but DB check in Step 3 fails again:
Code: [Select]
( ! ) Fatal error: Class 'rcube_db_' not found in /var/www/mail-0.9/program/lib/Roundcube/rcube_db.php on line 80
Call Stack
# Time Memory Function Location
1 0.0001 134132 {main}( ) ../index.php:0
2 0.0142 388304 include( '/var/www/mail-0.9/installer/test.php' ) ../index.php:156
3 0.0437 492196 rcube_db::factory( ) ../test.php:128

Same as in first post, I'd say

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,849
Re: [0.9 beta] DB check fails with "Fatal error: Class 'rcube_db_' not found"
« Reply #10 on: January 31, 2013, 01:21:24 PM »
i think you should try replacing the config/db.inc.php file you used from debain with the proper db config file.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline husky83

  • Jr. Member
  • **
  • Posts: 19
Re: [0.9 beta] DB check fails with "Fatal error: Class 'rcube_db_' not found"
« Reply #11 on: February 01, 2013, 10:27:28 AM »
Hi,
well, the config file replacement seemed to work, but somehow the login didn't succeed - it kept telling me my session was invalid, even after restarting the browser completely.
In the end I did a completely new install, which works fine now.

Only problem: The logout link at the top right corner isn't visible, works flawlessly nevertheless.

Thanks for your kind help :D