Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: Theet on March 26, 2010, 05:03:16 AM

Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 26, 2010, 05:03:16 AM
I have installed the plugin "calendar":

RoundCube Calendar (http://rc-calendar.lazlo.me/)

In step 3: Run the SQL file in /calendar/SQL/

How do I run this SQL file?

The plugin have I uploaded into:
/volume1/@appstore/MailStation/roundcubemail/plugins/calendar

Then I have a link for the plugin to the calendar like:
/volume1/@appstore/MailStation/target/roundcubemail/config/main.inc.php

$rcmail_config['plugins'] = array(
'emoticons',
'calendar'
);

Now I will see "SERVER ERROR (OK)" after clicking on de button Calendar.
I will see the calendar and above the ERROR.

When I make an appointment, I will get the message "SERVER CURRENTLY NOT AVAILABLE"

In the forum of the rc-calendar they have write:

If the plugin has a SQL folder:

Adjust "Roundcube" Database as shown in the mysql.sql script.
By default MyRoundcube plugins support MySQL database.


Please who wants to help me?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 26, 2010, 11:30:43 AM
Do you have PHPMyAdmin? If you do, you can go into your RoundCube database and upload the file into the database.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 26, 2010, 11:47:18 AM
Quote from: skaero;26359
Do you have PHPMyAdmin? If you do, you can go into your RoundCube database and upload the file into the database.


You make me happy, I do have phpMyAdmin, but I don't see a database from RoundCube / MailStation / roundcubemail....

What to do?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 26, 2010, 11:54:06 AM
RoundCube has to have a database to work, look in the /config/db.inc.php look for the $rcmail_config['db_dsnw'] it should have a string like: mysql://roundcube:pass@localhost/roundcubemail the last part (mysql://roundcube:pass@localhost/roundcubemail) is the database that RoundCube is using.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 26, 2010, 12:02:42 PM
Quote from: skaero;26361
RoundCube has to have a database to work, look in the /config/db.inc.php look for the $rcmail_config['db_dsnw'] it should have a string like: mysql://roundcube:pass@localhost/roundcubemail the last part (mysql://roundcube:pass@localhost/roundcubemail) is the database that RoundCube is using.


I have never done this before, once is the first time:

How to import this database into phpMyAdmin?
roundcubemail is a part of AJAX software in Synology

(Synology Inc. - NEW NAS Experience - (http://www.synology.nl) - MailStation) the software of roundcubestation is
placed in a map called @appstore. I don't think so that I can import the database with the import button....
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 26, 2010, 12:07:33 PM
Quote from: skaero;26361
RoundCube has to have a database to work, look in the /config/db.inc.php look for the $rcmail_config['db_dsnw'] it should have a string like: mysql://roundcube:pass@localhost/roundcubemail the last part (mysql://roundcube:pass@localhost/roundcubemail) is the database that RoundCube is using.


With telnet I have a maps:

/volume1/homes/.Maildir (here is saved all personal mail by user)
/volume1/@appstore/MailStation/roundcubemail/plugins

I have looked into phpMyAdmin, but I don't see a SQL database called
"roundcube..."

roundcubemail is a part of AJAX software from Synology, software like
MailStation is covered behind @appstore map. How can I import the
database from roundcube?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 26, 2010, 12:39:31 PM
What does your /config/db.inc.php say that the database that RoundCube is using it doesn't have to have roundcube in the name.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 26, 2010, 12:57:30 PM
Quote from: skaero;26366
What does your /config/db.inc.php say that the database that RoundCube is using it doesn't have to have roundcube in the name.

$rcmail_config['db_dsnw'] = 'pgsql://roundcube:@localhost/roundcubemail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// Warning: for SQLite use absolute path in DSN:
// sqlite example: 'sqlite:////full/path/to/sqlite.db?mode=0646';

This is what is says...

The db.inc.php file is listed in:  /volume1/@appstore/MailStation/roundcubemail/config/db.inc.php

The databases from phpMyAdmin are saved in: /volume1/@database/mysql/ but there isn't a database who's look like roundcube...
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 26, 2010, 01:21:01 PM
Ah your using a Postgres SQL database not MySQL I don't know if the calendar plugin works with Postgres SQL, and I don't know as much about Postgres SQL management tools, maybe Rosali would have a bettor idea about getting it to work with Postgres SQL.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 26, 2010, 01:24:18 PM
Quote from: skaero;26373
Ah your using a Postgres SQL database not MySQL I don't know if the calendar plugin works with Postgres SQL, and I don't know as much about Postgres SQL management tools, maybe Rosali would have a bettor idea about getting it to work with Postgres SQL.

Above stands:

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/database
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql

Thank you for the help so far, Rosali is another moderator I guess?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 27, 2010, 05:25:29 AM
Yes Rosali is another moderator and is also working on the calendar plugin, he may have a better idea if it would work with Postgres SQL.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 28, 2010, 05:39:28 AM
Quote from: skaero;26382
Yes Rosali is another moderator and is also working on the calendar plugin, he may have a better idea if it would work with Postgres SQL.

Will you please inform Rosali about this forum item?
I'm very interested for a solution, because there are more plugins which are working with SQL... Thanks in advance.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 28, 2010, 08:15:00 AM
I sent him a PM.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: rosali on March 29, 2010, 12:53:50 AM
Sorry, but I have no knowledge about Postgres database.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: dziobak on March 29, 2010, 04:49:23 AM
you can install 'phpPgAdmin' and make in easy way that table in database.
I don't know if there is only sql language used for mysql. If yes, you should contact with author of this plugin.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 29, 2010, 07:29:23 AM
Quote from: dziobak;26433
you can install 'phpPgAdmin' and make in easy way that table in database.
I don't know if there is only sql language used for mysql. If yes, you should contact with author of this plugin.


I don't know You mean phpMyAdmin?  Yes I have installed phpMyAdmin.
Is there a possibillity to install only the calendar part on phpMyAdmin?

How can I make a link to the database with below standing fields?

CREATE TABLE `events` (
  `event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `start` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `end` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `summary` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `location` varchar(255) NOT NULL DEFAULT '',
  `categories` varchar(255) NOT NULL DEFAULT '',
  `all_day` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY(`event_id`),
  CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`)
    /*!40008
      ON DELETE CASCADE
      ON UPDATE CASCADE */
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

and something like:

/* database table name */
$rcmail_config['db_table_events'] = 'events';

password and user?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: dziobak on March 29, 2010, 08:46:51 AM
'phpMyAdmin' is a WWW interface for mysql database.
You are using PostgreSQL so you need to work o application designed for this database. If you what to use WWW interface you mus use 'phpPgAdmin'.

The code to create table is designed for mysql database. You must recode if to PostgreSQL database. For example MySQL users AUTO_INCREMENT and in PostgreSQL (if i remember this) is serial.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 30, 2010, 02:50:32 AM
Quote from: dziobak;26447
'phpMyAdmin' is a WWW interface for mysql database.
You are using PostgreSQL so you need to work o application designed for this database. If you what to use WWW interface you mus use 'phpPgAdmin'.

The code to create table is designed for mysql database. You must recode if to PostgreSQL database. For example MySQL users AUTO_INCREMENT and in PostgreSQL (if i remember this) is serial.

I have installed phpPgAdmin yesterday, but I can't login yet because of: "Login disallowed for security reasons".

Now I have to configure phpPgAdmin and I hope, after that login is possible, I can read the sql databases of the Synology...

After that I hope that it is possible to insert the field which are important for the calendar.
Then I think I can use all other plugins which have to use the postgreSQL database.

Thank You that I have learned much more after all Your advices, I hope it will succeeded!
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on March 30, 2010, 05:51:51 PM
Now I have installed phpPgAdmin into Synology, it works pritty well!
I can see all PostgreSQL databases and I can edit/add etc.

I cannot import a table, so I have made a table with 8 columns but the calendar is still
not working:

CREATE TABLE `events` (
  1) `event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  2) `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  3) `start` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  4) `end` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  5) `summary` varchar(255) NOT NULL,
  6) `description` text NOT NULL,
  7) `category` varchar(255) NOT NULL DEFAULT '',
  8) `all_day` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY(`event_id`),
  CONSTRAINT `user_id_fk_events` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`)
    /*!40008
      ON DELETE CASCADE
      ON UPDATE CASCADE */
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

what to do with the last part of this sql sript? CONSTRAINT...to */; ??? How can I tell the table to do this?

Can anybody tell me how I define (commands) the fields above with phpPgAdmin?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on March 31, 2010, 01:53:24 PM
Your going to have to convert the database to PostgreSQL here is a guild witch mite help Converting MySQL to PostgreSQL - Wikibooks, collection of open-content textbooks (http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL)
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on April 01, 2010, 08:47:33 AM
Quote from: skaero;26519
Your going to have to convert the database to PostgreSQL here is a guild witch mite help Converting MySQL to PostgreSQL - Wikibooks, collection of open-content textbooks (http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL)

Thank You, I have take some information from here.
Now I have:

This is okya now! I will not see this error anymore...
Now I will see "SERVER ERROR (OK)" after clicking on de button Calendar.
I will see the calendar and above the ERROR.

but...

The next error comes when I will make an appointment, what is probably wrong here?
When I make an appointment, I will get the message "SERVER CURRENTLY NOT AVAILABLE"
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on April 01, 2010, 09:42:06 AM
Your most likely going to have to recode the query's that are going to the database. In the calendar.php in the plugin folder there are 5 $rcmail->db->query witch have MySQL formatted query's they will have to be reformatted for PostgreSQL.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: Theet on April 01, 2010, 11:17:56 AM
Quote from: skaero;26555
Your most likely going to have to recode the query's that are going to the database. In the calendar.php in the plugin folder there are 5 $rcmail->db->query witch have MySQL formatted query's they will have to be reformatted for PostgreSQL.


Okay, can you please tell me what You mean with the 5 $rcmail->db->query references?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: SKaero on April 03, 2010, 12:26:18 AM
If you look in the calendar plugin folder in the calendar.php and search for "$rcmail->db->query references" you should find the query that are being sent to the database. The problem is the query are formatted for MySQL not PostgreSQL.
Title: I had solution
Post by: charan315 on June 17, 2010, 01:27:20 PM
Don't need to do any thing just delete the calendar directory with files using ftp
(previous files), download the attachment, uncompress it & upload it to plugins directory, that's it finish.


no need to run mysql file, no errors works 100%
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: jcreyesb on August 18, 2010, 02:48:49 PM
Quote from: Theet;26347
I have installed the plugin "calendar":

RoundCube Calendar (http://rc-calendar.lazlo.me/)

In step 3: Run the SQL file in /calendar/SQL/

How do I run this SQL file?

The plugin have I uploaded into:
/volume1/@appstore/MailStation/roundcubemail/plugins/calendar

Then I have a link for the plugin to the calendar like:
/volume1/@appstore/MailStation/target/roundcubemail/config/main.inc.php

$rcmail_config['plugins'] = array(
'emoticons',
'calendar'
);

Now I will see "SERVER ERROR (OK)" after clicking on de button Calendar.
I will see the calendar and above the ERROR.

When I make an appointment, I will get the message "SERVER CURRENTLY NOT AVAILABLE"

In the forum of the rc-calendar they have write:

If the plugin has a SQL folder:

Adjust "Roundcube" Database as shown in the mysql.sql script.
By default MyRoundcube plugins support MySQL database.


Please who wants to help me?



Drop table events on roundcube database, and them use the sql file to create the drop table...
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: jcreyesb on August 18, 2010, 02:50:23 PM
Quote from: charan315;28109
Don't need to do any thing just delete the calendar directory with files using ftp
(previous files), download the attachment, uncompress it & upload it to plugins directory, that's it finish.


no need to run mysql file, no errors works 100%


Is possible share calendar?
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: dziobak on August 18, 2010, 03:54:14 PM
if you use Rosali's version of calendar (Rosali's plugins (http://code.google.com/p/myroundcube/downloads/detail?name=trunk-r-3878.1.zip)), there is possibility to share it.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: jcreyesb on August 18, 2010, 05:48:59 PM
yes... i use this is. how i can configured to share calendar?  levels

Public--all user
Private-- some users
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: dziobak on August 19, 2010, 12:44:31 AM
public - make an account, login with RC, go to calendar feed options, enable option read-only or read-write access, copy link in feed URL and paste it to calendar config file.
private - the same as public, but create another account and don't paste it to config file but into user's calendar feed options.
Title: How to run a SQL mysql.sql file for plugin "rc-calendar"?
Post by: freebird on August 19, 2010, 04:51:46 AM
I see there are a few different kinds of Calendar extensions for php sites... However, I'm not sure which to choose, or how to go about, so I could use a little direction. The business I work for is wanting to have a calendar on its site that connects to the MySql database. One that logs information to the database when it's entered, and shows it still there for access or download. I'm not sure if this even exists in a dreamweaver extension, etc, any help would be appreciated!!
Title: I have the same question - how does on 'run the sql file'
Post by: klc on August 26, 2010, 06:40:49 PM
None of the answers in this thread have seemed very helpful. I tried going into the database via myPhpAdmin and importing the file, but that didn't do anything. What did the person mean by 'upload the file to myPhpAdmin?

If anyone knows how to do this and can post CLEAR (and hopefully simple)  instructions, it would be most appreciated.

Thanks.