Author Topic: Trying to add Calendar plugin to Roundcube running on ClearOS 7.5  (Read 4106 times)

Offline Siv

  • Newbie
  • *
  • Posts: 7
Hi,
I am trying to add the calendar plug-in to Roundcube on ClearOS V7.5.0.
I found a procedure on how to add the plugin and this is the process:

Code: [Select]
Installation of the Calendar Plugin for Roundcube

Follow this commands. You can change them to fit the specific paths of your deployments.

yum install git php-sabre-*
cd /tmp
git clone https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git
cd /usr/share/roundcubemail/plugins
cp -r /tmp/roundcubemail-plugins-kolab/plugins/calendar .
cp -r /tmp/roundcubemail-plugins-kolab/plugins/libcalendaring .
cd calendar
cp config.inc.php.dist config.inc.php

Edit config.inc.php to fit your needs. Then follow:

********** this is where I got stuck *******************************************
mysql -u root -pYOURPASSWORD roundcubedb < drivers/database/SQL/mysql.initial.sql
*************************************************************************

Patch the Calendar Plugin

CentOS 7 (and probably other distributions) does not have the composer and it does not load automatically the classes. You need to patch it. Do the following:

cd ../libcalendaring
nano libvcalendar.php

Add the following code:

spl_autoload_register(function ($class) {
    if (strpos($class, 'Sabre\\')===0) {
        $file = '/usr/share/php/'.str_replace('\\', '/', $class).'.php';
        @include $file;
    }
});

As marked by the asterisks (you may need to scroll the code section to see it above) I hit a snag at this point because when I tried to run the mysql command I got:

-bash: mysql: command not found

I therefore installed mysql and that installed successfully but when I ran the command after that I got:

ERROR 1049 (42000): Unknown database 'roundcubedb'

I then did some research to see if perhaps on ClearOS they use a different database as I can see that you can use SQLite and other database types. This led me to opening the config.inc.php file and strangely in the "Database" section there is a reference to:

$config['db_dsnw'] = 'mysql://roundcube:CWg......p@127.0.0.1:3308/roundcubemail';

Which makes me think it is using mysql somehow so maybe I din't need to install mysql at all?

Can anyone help me figure out how to run the step I had issues with as I would like to get this plugin working with roundcube.

Siv

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Trying to add Calendar plugin to Roundcube running on ClearOS 7.5
« Reply #1 on: August 31, 2018, 09:35:10 AM »
That is probably MariaDB, not MySQL. And the database name is roundcubemail, not roundcubedb.

Offline Siv

  • Newbie
  • *
  • Posts: 7
Re: Trying to add Calendar plugin to Roundcube running on ClearOS 7.5
« Reply #2 on: August 31, 2018, 10:08:53 AM »
That is probably MariaDB, not MySQL. And the database name is roundcubemail, not roundcubedb.

I will try substituting "roundcubemail" in the command and see i it accepts.

If Roundcube is using MariaDB, would the procedure be different that I am working from?

Siv

Offline Siv

  • Newbie
  • *
  • Posts: 7
Re: Trying to add Calendar plugin to Roundcube running on ClearOS 7.5
« Reply #3 on: August 31, 2018, 10:16:50 AM »
Tried that and get:

ERROR 1049 (42000): Unknown database 'roundcubemail'

So where is the database as I can use Roundcube webmail and it's still working OK?

Could it be using SQLite perhaps?

MariaDB is not installed using the Marketplace so it doesn't appear in the Dashboard of ClearOS?

Siv

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Trying to add Calendar plugin to Roundcube running on ClearOS 7.5
« Reply #4 on: September 01, 2018, 02:50:13 AM »
3308 is non-standard port number, so you need to use --port argument.

Offline Siv

  • Newbie
  • *
  • Posts: 7
Re: Trying to add Calendar plugin to Roundcube running on ClearOS 7.5
« Reply #5 on: September 01, 2018, 12:43:03 PM »
3308 is non-standard port number, so you need to use --port argument.

Alec,
Could you elaborate slightly as I am struggling with this.
The reference to port 3308 is from within the working Roundcube configuration file "config.inc.php" which is in the /usr/share/roundcubemail/config/ folder.
Or are you telling me that the command I am trying to run:

mysql -u root -pYOURPASSWORD roundcubedb < drivers/database/SQL/mysql.initial.sql

should be altered to include the --port argument.

I am still unsure if that would work as it appears I am not finding the location of the database as it keeps giving me errors saying that the database is not there? It must be as otherwise how is the current version of roundcube working?

Any help appreciated.

Siv