This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation.

Difference between revisions of "Z-push"

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
(Installation)
(Upgrade 2 to 2.1 with state migration)
Line 78: Line 78:
  
 
=Upgrade 2 to 2.1 with state migration=
 
=Upgrade 2 to 2.1 with state migration=
 +
 +
When you want to keep the synchronisation states when migrating Z-Push from version 2 to version 2.1 then you can follow the following steps.
 +
 +
(The paths in this guide are the paths that are used when you have installed Group-Office through the apt-packages)
 +
 +
# Execute the update script '/usr/share/groupoffice/modules/sync/z-push/install.sh' to install Z-push 2.1.
 +
# Change in '/usr/share/groupoffice/modules/z-push21/tools/migrate-2.0.x-2.1.0.php' the line 'define('ZPUSH_BASE_PATH', "../");' to 'define('ZPUSH_BASE_PATH', "./");'
 +
# Copy the folder '/home/groupoffice/zpush2state' to '/home/groupoffice/zpush21state'
 +
# Change into folder '/usr/share/groupoffice/modules/z-push21'
 +
# Exectue migration script on the cli with command: 'tools/migrate-2.0.x-2.1.0.php'
 +
# Change owner and group of '/home/groupoffice/zpush21state' from 'root' to 'www-data'
 +
# Update the Apache configuration and restart Apache
  
 
=Uninstall=
 
=Uninstall=

Revision as of 10:01, 28 April 2014

Overview

This module can be used to synchronize Emails, Contacts, Tasks and Calendars to a mobile device/tablet.

Dependencies

Apache modules

Some apache modules cannot be enabled because Z-Push is NOT working when they are enabled.

Requirements

Installation

IMPORTANT NOTE: remember to replace the z-push files again when you are upgrading Group-Office if you installed Group-Office manually! Debian packages will do this automatically for you from now on. But you need to perform step 5 manually (this can not be automated due to licensing issues with z-push).

Automatic

To install the z-push module automatically, you can use the script that is provided with the "Sync" module. (install.sh)

The script is located in the "modules/sync/z-push" folder.

The default alias in /etc/apache2/conf.d/groupoffice.conf points to the "z-push2" folder. Please change it to "z-push".

Manual

ActiveSync support does not work out of the box. To add support of ActiveSync take the following steps (Step 1 to 5 can be done with modules/sync/z-push2/install.sh too):

1. Download z-push from http://zarafa-deutschland.de/z-push-download/final/1.5/. We used version 1.5.2 (But it's probably best to take the latest stable 1.x version of z-push).

2. Unpack the archive and put it in the "modules" directory of Group-Office.

3. rename the folder to "z-push"

4. Copy the file backend/GObackend.php from modules/sync/z-push/ to modules/z-push/backend/

5. Copy config.php from modules/sync/z-push/ to modules/z-push/

6. Now, you must configure Apache to redirect the URL 'Microsoft-Server-ActiveSync' to the index.php file in the modules/z-push/ directory.
This can be done by adding the line:

Alias /Microsoft-Server-ActiveSync /path/to/groupoffice/modules/z-push/index.php

Don't use a symlink, this won't work.

7. Restart apache2 and configure your mobile device with the servername, username and password and you should be in sync!

CGI mode

By default z-push only works when PHP is loaded as an Apache module. If you use PHP in CGI mode you'll have to follow this workaround:

http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=1245&p=4762&hilit=apache_request_headers#p4762

You can also try to create a .htaccess file in the Group-Office root dir and add the following lines to it:

Options +FollowSymLinks
RewriteEngine On
RewriteRule /Microsoft-Server-ActiveSync(.*) modules/z-push/index.php$1 [E=ACTIVESYNC:true,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

In some versionw of PHP the apache_request_header() function doesn't exist and the following needs to be added to modules/z-push/compat.php at the end of the file just before: ?>

if (!function_exists('apache_request_headers')) {
    function apache_request_headers() {
        $header = array();
        $header['Ms-Asprotocolversion'] = $_SERVER['HTTP_MS_ASPROTOCOLVERSION'];
        $header['X-Ms-Policykey'] = $_SERVER['HTTP_X_MS_POLICYKEY'];
        $header['User-Agent'] = $_SERVER['HTTP_USER_AGENT'];

        return $header;
    }
    
    list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6)));
}

Upgrade 2 to 2.1 with state migration

When you want to keep the synchronisation states when migrating Z-Push from version 2 to version 2.1 then you can follow the following steps.

(The paths in this guide are the paths that are used when you have installed Group-Office through the apt-packages)

  1. Execute the update script '/usr/share/groupoffice/modules/sync/z-push/install.sh' to install Z-push 2.1.
  2. Change in '/usr/share/groupoffice/modules/z-push21/tools/migrate-2.0.x-2.1.0.php' the line 'define('ZPUSH_BASE_PATH', "../");' to 'define('ZPUSH_BASE_PATH', "./");'
  3. Copy the folder '/home/groupoffice/zpush2state' to '/home/groupoffice/zpush21state'
  4. Change into folder '/usr/share/groupoffice/modules/z-push21'
  5. Exectue migration script on the cli with command: 'tools/migrate-2.0.x-2.1.0.php'
  6. Change owner and group of '/home/groupoffice/zpush21state' from 'root' to 'www-data'
  7. Update the Apache configuration and restart Apache

Uninstall

Remove the z-push2 folder from the modules directory of Group-Office.

User Manual

Visit the following page for client instructions:

Synchronization

Additional Notes

Debugging

Sometimes it can happen that an item is not synced to the device.

Then you can add a file (call the file "debug.txt") to the /modules/z-push folder and make sure that it is writable for Apache.

This log will be filled with debugging information when you sync.

Then try to sync your device again and check the errors in the "debug.txt" file.

If you cannot solve the problems by yourself then please create a support ticket for the problem and attach the log to the ticket.