Admins/Synchronisation
Tine 2.0 makes it possible to you have your data synchronized between your mobile phone and Tine 2.0. The synchronisation is based on ActiveSync, which allows to choose from a broad range of devices. For example your can use any Nokia business phone(Exx), the IPhone, different Android based phones and all windows mobile based phones. We also implemented ActiveSync push. ActiceSync push gives you access to your data nearly in realtime. No need to buy a Blackberry any more.
Contents |
Patent warning for US-based users
Don't use our implementation of ActiveSync if you live in the USA. As Microsoft has a software patent on ActiveSync you can not use our code free of charge. We are currently in contact with Microsoft to negotiate a deal for our US-based users. Any other users are free to use our ActiveSync implementation.
Requirements
The requirements on the serverside are very low. You just need to make a special URL available, needed by the ActiveSync client. This URL hardcoded into the client and can not be changed.
Any ActiveSync client tries to connect to the following URL on your Tine 2.0 installation.
http(s)://your.domain.name/Microsoft-Server-ActiveSync
Below you find configuration examples for different webservers.
If you have configured everything correctly, you should be able to call this url
http://your.web.server/Microsoft-Server-ActiveSync
and should get prompted for your Tine 2.0 username and password. If the login credentials were accepted you should see an 'It works!' screen in your browser.
Apache Webserver : Using the Rewrite Directive
In the vhost configuration, add the following:
RewriteEngine on
RewriteRule /Microsoft-Server-ActiveSync(.*) /path/to/tine20/index.php$1 [E=REDIRECT_ACTIVESYNC:true,E=REMOTE_USER:%{HTTP:Authorization}]
If you don't have access to your Apache configuration (e.g. in a shared hosting environment) you can alternatively add the code above to the '.htaccess' file in your webservers root directory.
Apache Webserver with CGI : Using the Rewrite Directive
As i had trouble moving Tine to a new server utilizing CGI/FCGI (i spent hours reading different forum threads and about the same amount of time changing my webserver config), i want to share, how i succeded using ActiveSync.
The big difference when using CGI/FastCGI instead of mod_php is, that the variables $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW] are not existent. The authentication method is therefore slightly different.
Environment: openSUSE 11.0 with Plesk 9.2.3, Apache 2.2.14 (mpm-worker), PHP 5.2.9, tine20-allinone-2010-03-ms1-1
As i use suexec, i have installed a wrapper script /srv/www/cgi/php-cgi-wrapper:
#!/bin/sh PHPRC="/etc/php5/fastcgi" export PHPRC exec /usr/bin/php-cgi5
The owner of the wrapper script php-cgi-wrapper and the directory /srv/www/cgi has to be identical to the
SuexecUserGroup <user> <group>
statement.
The domain is configured in Plesk with setting
FastCGI for PHP
and the corresponding httpd.include should contain:
<IfModule mod_fcgid.c> <Files ~ (\.php)> SetHandler fcgid-script FCGIWrapper /srv/www/cgi/php-cgi-wrapper .php Options +ExecCGI allow from all </Files> </IfModule>
The following vhost configuration assumes, that your url to login to your tine installation is
http://<yourdomain>/tine20/
i.e. you get to your setup.php via
http://<yourdomain>/tine20/setup.php
In your vhost configuration you should then add:
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
RewriteRule /Microsoft-Server-ActiveSync(.*) /tine20/index.php$2 [E=REDIRECT_ACTIVESYNC:true,E=REMOTE_USER:%{HTTP:Authorization}]
In case your tine installation is in the document root and not in a subfolder, the fourth line from above with the RewriteRule should then read instead:
RewriteRule /Microsoft-Server-ActiveSync(.*) /index.php$2 [E=REDIRECT_ACTIVESYNC:true,E=REMOTE_USER:%{HTTP:Authorization}]
If you don't have access to your Apache configuration (e.g. in a shared hosting environment) you can alternatively add the code above to the '.htaccess' file in your webservers root directory.
You can test your setup up by pointing your browser to
http://<yourdomain>/Microsoft-Server-ActiveSync
You should get a pop-up window asking for your username/password and after entering your credentials you should then see the famous
It works! Your username is: <username> and your IP address is: xxx.xxx.xxx.xxx.
Congratulations. You are done.
If you still encounter problems at this point, i have one more idea (please note that it _should_ work already without this patch but anyway...):
In your ActiveSync/Server/Http.php look for:
// when used with (f)cgi no PHP_AUTH variables are available without defining a special rewrite rule
if(!isset($_SERVER['PHP_AUTH_USER'])) {
// $_SERVER["REMOTE_USER"] == "Basic didhfiefdhfu4fjfjdsa34drsdfterrde..."
$basicAuthData = base64_decode(substr($_SERVER["REMOTE_USER"],6));
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(":", $basicAuthData);
}
and change it to:
// when used with (f)cgi no PHP_AUTH variables are available without defining a special rewrite rule
if(!isset($_SERVER['PHP_AUTH_USER'])) {
// $_SERVER["REMOTE_USER"] == "Basic didhfiefdhfu4fjfjdsa34drsdfterrde..."
if (isset($_SERVER["Authorization"])) {
list($mm_type, $mm_cred) = split (" ", $_SERVER["Authorization"]);
if($mm_type == 'Basic') {
list($mm_user, $mm_pass) = explode(":", base64_decode($mm_cred));
$_SERVER['PHP_AUTH_USER'] = $mm_user;
$_SERVER['PHP_AUTH_PW'] = $mm_pass;
}
} else {
$basicAuthData = base64_decode(substr($_SERVER["REMOTE_USER"],6));
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(":", $basicAuthData);
}
lighttpd Webserver
@fixme
Supported devices
In general any ActiveSync enabled device should be working out of the box. So far we have success reports for following devices:
- Windows mobile pda (Pocket Loox T810)
- Nokia E61 with Mail for Exchange (download here / any other Exx phone should be working too)
- Nokia N95 8GB with RoadSync v4
- Nokia N95 with Mail for Exchange
- IPhone 3G setup howto
- HTC Kaiser alias MDA Vario 3 - WM6.1
- Palm Pre (tested with webOS Emulator)
- HTC MDA Compact III WM6.1
Supported datatypes
Currently we support the synchronisation of contact, events and tasks.. Support for synchronizing emails is partly implemented but still needs some work.If nothing goes wrong, it will be implemented in Q4/2009.



