Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL Version #1

Closed
flashtopia opened this issue May 9, 2012 · 24 comments
Closed

MySQL Version #1

flashtopia opened this issue May 9, 2012 · 24 comments
Assignees
Milestone

Comments

@flashtopia
Copy link

SqlLite is great.
We are looking for a CardDav / CalDav server that would support mysql.

The reason for this is that many people use Postfix / DovCot with MySQL to manage user accounts.
Being able to add a few tables to the same database, and then add calendering functionality / vcard storage would be a very valuable project. Add Z-Push as an alternative to pull calendar, vcard, and mail and you have a winner.

Please let me know if you are planning on building a MySQL version.

Frank

@jeromeschneider
Copy link
Contributor

Hello Frank,

It might be possible to base Baïkal on MySQL, yes.
I'm at work right now, but I will provide you with a more elaborated
answer this weekend.

Regards

JÉRÔME SCHNEIDER

mail@jeromeschneider.fr [2]

On Wed, 9 May 2012 16:05:06 -0700,
flashtopia wrote:

SqlLite is great.
We are looking for a CardDav /
CalDav server that would support mysql.

The reason for this is that
many people use Postfix / DovCot with MySQL to manage user accounts.

Being able to add a few tables to the same database, and then add
calendering functionality / vcard storage would be a very valuable
project. Add Z-Push as an alternative to pull calendar, vcard, and mail
and you have a winner.

Please let me know if you are planning on
building a MySQL version.

Frank


Reply to this email
directly or view it on GitHub:

#1 [1]

Links:

[1]
#1
[2]
mailto:mail@jeromeschneider.fr

@flashtopia
Copy link
Author

The idea was to store contacts vcards in MySQL.
A lot of companies already have some sort of user / contacts system in place usually in MySQL or MSSQL.
Its hard to sync sqllite and mysql. Might just be cleaner to offer other "backend" options such as mysql.

-----Original Message-----
From: Jérôme Schneider [mailto:reply@reply.github.com]
Sent: Friday, May 11, 2012 12:03 AM
To: Frank Basti
Subject: Re: [Baikal] MySQL Version (#1)

Hello Frank,

It might be possible to base Baïkal on MySQL, yes.
I'm at work right now, but I will provide you with a more elaborated answer this weekend.

Regards

JÉRÔME SCHNEIDER

mail@jeromeschneider.fr [2]

On Wed, 9 May 2012 16:05:06 -0700,
flashtopia wrote:

SqlLite is great.
We are looking for a CardDav /
CalDav server that would support mysql.

The reason for this is that
many people use Postfix / DovCot with MySQL to manage user accounts.

Being able to add a few tables to the same database, and then add calendering functionality / vcard storage would be a very valuable project. Add Z-Push as an alternative to pull calendar, vcard, and mail and you have a winner.

Please let me know if you are planning on
building a MySQL version.

Frank


Reply to this email
directly or view it on GitHub:

#1 [1]

Links:

[1]
#1
[2]
mailto:mail@jeromeschneider.fr


Reply to this email directly or view it on GitHub:
#1 (comment)

@ghost ghost assigned jeromeschneider May 14, 2012
@flashtopia
Copy link
Author

Jerome,
Were you ever able to look into MySQL?
Also few small questions:

  1. Are vcards stored in SQL or in some filesystem directory?
  2. Are all the fields used by apple devices available (nickname, email, photo?)
  3. Does it support the apple global address list?
  4. Does it support permissions (read only).

Really looking forward to mysql support.

@ghost
Copy link

ghost commented Jul 22, 2012

Hi All.
Baikal is using PDO. I think it easy to implement for mySQL.
So I'd like to try this issue.

My plan is

  • implent /usr/local/github/Baikal/Core/Frameworks/Flake/Core/Database/MySql.php
  • edit /usr/local/github/Baikal/Core/Frameworks/Flake/Framework.php for Mysql
$this->oDb = new \PDO(
            'mysql:host='.$host_name.';dbname='.$db_name, 
            $user_name, 
            $password, 
            array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")

@jeromeschneider
Copy link
Contributor

@flashtopia Nope, but it seems that @mashimaro-jp has a plan to implement this. I would happily pull your work in the master if you implement this, @mashimaro-jp :)

Anyway, @flashtopia you're right, it seems a must for Baïkal, as many people already have a MySQL server at hand.

Are vcards stored in SQL or in some filesystem directory?
The vcards are stored in the DB, in the table "cards"

Are all the fields used by apple devices available (nickname, email, photo?)
Yes, all third-party properties are handled, as cal and card elements are stored in their raw DAV format in the DB.
CalDAV and CardDAV are basically a remote-storage protocols, each specialized in their field (for instance, some specific filters are available to access data) - and Baïkal store cal and card elements as they are produced by your client, including third parties properties (like the ones used by Apple).

Does it support the apple global address list ?
I'm not sure what this is, so I guess the answer is no :)

Does it support permissions (read only).
No, but I have plans to include .ics stream export and later permissions and shared calendars / addressbooks

@flashtopia
Copy link
Author

Great I will try it tonight.
Last question, does it support (read only) contacts?

@jeromeschneider
Copy link
Contributor

Last question, does it support (read only) contacts?

@flashtopia no. I'm going to create a milestone in the project and attach these feature requests.

@flashtopia
Copy link
Author

Thanks Jerome. I am working on writing rewrite rules for Apache / IIS that default to the phone/ipad settings for conctacts.myserver.com and calendar.myserver.com. Once i get everything working properly ill make sure the share the updates.

The plan again is to build an interface to existing MySQL contact stores. This allows in house CRM systems, to update carddav devices so that if a contact calls, it simply shows up on caller id.

@flashtopia
Copy link
Author

@mashimaro-jp i was under the impression that the flake framwork supported mysql. Actually not sure what the flake framework actually is. Can you share your MySQL code?

@ghost
Copy link

ghost commented Jul 24, 2012

@flashtopia Sorry, I'm under implement too. But I wanna share part of code. please look https://gist.github.com/3169542

@jeromeschneider
Copy link
Contributor

@mashimaro-jp @flashtopia I'm going to implement MySQL support in the core. As pointed by @mashimaro-jp this should be pretty straight-forward. I'll keep you updated via this topic :)

@flashtopia
Copy link
Author

Thanks Jerome. Greatly appreciate the work you do!
Mashimaro- Thank you for getting things cooking!

@flashtopia
Copy link
Author

@mashimaro-jp do you have an estimate on when this will be completed? Really looking forward to this featureset.

@flashtopia
Copy link
Author

Sorry to be a pest, but any updates on this issue?

@jeromeschneider
Copy link
Contributor

Hello @flashtopia, i'm working on this this very morning :)

@jeromeschneider
Copy link
Contributor

Hello @flashtopia, MySQL is now fully supported by Baïkal.
You'll find the updated packages at http://baikal.codr.fr

MySQL settings are found in the admin, under the "System settings" section.

Please provide feedback :)

@flashtopia
Copy link
Author

Thanks @jeromeschneider . I really appreciate being able to use MySQL.

I have successfully been able to use SQL inserts to create contacts in the CARDS table and have them show up on ipad. Essentially just do SQL inserts with the correct addressbookid, carddata, random uri with vcf extension, and lastmodified time stamp. The only catch is everytime an update takes place I also need to change the ctag value in the addressbooks table.

What is the ctag? is it some sort of freshness stamp?

Also two little things:

  1. for some reason the default addressbook does not sync on Ipad. Meaning contacts created in it, do not work.
  2. the download is missing the htaccess .

I have gotten Baikal to work with DNS Srv records for contacts. This makes configuring iOS clients really simple. The catch is that this only works on port 80. I am running baikal on port 8800 now and SRV record auto configure breaks.
So srv record like this works:
_carddav._tcp 0 0 80 contacts.domain.com/card.php. <--- WORKS
_carddav._tcp 0 0 8800 contacts.domain.com:8800/card.php <--- INVALID FORMAT (cannot create srv).

In an attempt to change things, i tried to make card.php the default document in my virtual host.
But adding "DirectoryIndex card.php" to to virtual host breaks sabredav.

Question:
Is it possible to have two virtual hosts:
A) baikal.mydomain.com
where it defaults to index.php and I am able to access the admin interface.

B) contacts.mydomain.com
where it automatically connects to card.php and there is no more need to type in the card.php name?
This is useful for fixing the SRV issue, makes for a cleaner setup.

Please advise.
And thanks again for great work!!!

@gillecaluim
Copy link

I'm also interested in integrating baikal into an ubuntu12.04 lamp server using mysql instead of sqlite. The main purpose being that I'm building a joomla home website and would like to sync a joomla calendar with baikal. with the end result being that mobile phone sync (android) would be possible with the home server rather than google calendars.
I downloaded the current "regular package" but nothing in the install/readme.md files mentions mysql support. Do i need the git repository instead?
Also, are you available for installation/customization consulting?

@o-simardcasanova
Copy link

Is it necessary to first install Baikal with SQLite and then change to MySQL or is it possible to directly install with MySQL?

@jeromeschneider
Copy link
Contributor

Right now, it's necessary, yes.
There's plan to change this in the future, though.

Regards,
Jérôme

Le 30 août 2012 à 14:26, Olivier Simard-Casanova notifications@github.com a écrit :

Is it necessary to first install Baikal with SQLite and then change to MySQL or is it possible to directly install with MySQL?


Reply to this email directly or view it on GitHub.

@o-simardcasanova
Copy link

Thanks for your answer. Do you have any idea of a schedule for this implementation?

@DjSlash
Copy link

DjSlash commented Nov 5, 2012

It would be nice to prefix the tables. This makes it easy to install Baikal in a single database.

@jeromeschneider
Copy link
Contributor

@simardcasanova with new version 0.2.3 you may now setup MySQL right at initialization time.

@jeromeschneider
Copy link
Contributor

@DjSlash I move this request to another issue.

@steveweg steveweg mentioned this issue Nov 20, 2019
1 task
cptsanifair pushed a commit to cptsanifair/Baikal that referenced this issue Apr 30, 2023
fix the patternReplace function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants