• Content
  • Comments (6)
  • Related articles
Jun
15
2012

How to install Z-push on WAMP Server under Windows SBS 2003 Friday, 15 June 2012

Download: Z-Push

  • Mobile data synchronization backend: the IMAP and the maildir backend for e-mail synchronisation, the vCard backend for contact synchronisation and one for the Zarafa package which allows full synchronization of E-mail, Calendar, Contacts and Tasks.
  • Being an opensource project under the GPL, it allows developers to add their own backend so that Z-Push can communicate with their groupware solution.

 

Installation, using virtual host example:

  • Unpack Z-Push in your web root folder, create: z-push.domain.net
  • Create an alias in WAMP Server [ c:\wamp\alias\z-push.conf ] with following content:

Alias /Microsoft-Server-ActiveSync “c:/wamp/www/z-push.domain.net/index.php”

<Directory “c:/wamp/www/z-push.domain.net/”>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>

  • Open: [ c:\wamp\bin\apache\Apache2.2.17\conf\extra\httpd-vhosts.conf ] and add corespondent Virtual Host for your alias:

<VirtualHost *:80>
ServerAdmin admin@domain.net
DocumentRoot “C:\wamp\www\z-push.domain.net”
ServerName z-push.domain.net
ErrorLog “c:/wamp/logs/z-push_error.log”
CustomLog “c:/wamp/logs/z-push_access.log” common
</VirtualHost>

  • Create [ .htaccess ] file with following content:

php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag magic_quotes_runtime off
php_flag short_open_tag on

  • Edit config.php (in your instalation folder) as follows:

/**********************************************************************************
*  Default FileStateMachine settings
*/
//define(‘STATE_DIR’, ‘/var/lib/z-push/’); – the default values for LINUX, below is defined for Windows
define(‘STATE_DIR’, ‘state/’);

/**********************************************************************************
*  Logging settings
*/
//define(‘LOGFILEDIR’, ‘/var/log/z-push/’); – the default values for LINUX, below is defined for Windows
define(‘LOGFILEDIR’, ‘logs/’);

/**********************************************************************************
*  Backend settings
*/
// The data providers that we are using (see configuration below)
//define(‘BACKEND_PROVIDER’, “BackendZarafa”); – the default handler
define(‘BACKEND_PROVIDER’, “BackendIMAP”);

    // ************************
//  BackendZarafa settings
// ************************
// Defines the server to which we want to connect
define(‘MAPI_SERVER’, ‘mail.domain.net’);

// ************************
//  BackendIMAP settings
// ************************
// Defines the server to which we want to connect
define(‘IMAP_SERVER’, ‘mail.domain.net’);

// copy outgoing mail to this folder. If not set z-push will try the default folders
define(‘IMAP_SENTFOLDER’, ‘INBOX.Sent’);

configure your smartphone as shown in bellow photos (screenshots from an android phone)

*replace domain.net and mail.domain.net with your own domain name

 

6 Comments

  1. pushdz says:

    if my mail server and z-push server synch are not on the same machine, in my android mobile i put in server the addresse of server synch z-push or mail server ?
    thanks

  2. Jeff says:

    I installed Z-Push on a Windows Server 2003 R2 box (WAMP) with hMailServer to use with my Android phone.

    Everything works except I seem to be encountering a loop during sync. One single email will sync to the phone, then it disappears, then it reappears… It does this over and over until I manually stop it.

    When I check the Z-Push logs, I keep getting the following entry in z-push.log:

    15/09/2012 18:27:59 [ 6076] [jeff@mysite.com] [INFO] Version=’2.0.2-1437′ method=’POST’ from=’172.16.1.12′ cmd=’Ping’ getUser=’jeff@mysite.com’ devId=’HTC16ed659072233251bdd3b759634e2′ devType=’jewel’
    15/09/2012 18:27:59 [ 6076] [jeff@mysite.com] [INFO] BackendIMAP->Logon(): User ‘jeff@mysite.com’ is authenticated on IMAP
    15/09/2012 18:27:59 [ 6076] [jeff@mysite.com] [INFO] InterProcessData::InitSharedMem(): PHP libraries for the use shared memory are not available. Functionalities like z-push-top or loop detection are not available. Check your php packages.
    15/09/2012 18:27:59 [ 6076] [jeff@mysite.com] [INFO] InterProcessData::InitSharedMem(): PHP libraries for the use shared memory are not available. Functionalities like z-push-top or loop detection are not available. Check your php packages.
    15/09/2012 18:27:59 [ 6076] [jeff@mysite.com] [INFO] NoHierarchyCacheAvailableException: Folderid ‘InvalidTaskID’ is not fully synchronized on the device – code: 0
    15/09/2012 18:27:59 [ 6076] [jeff@mysite.com] [INFO] HandlePing(): unknown collection ‘InvalidTaskID’, triggering HierarchySync

    Below is the only error in the z-push-error.log:

    15/09/2012 17:10:52 [ 2924] [jeff@mysite.com] [ERROR] SimpleMutex not available as InterProcessData is not available. This is not recommended on duty systems and may result in corrupt user/device linking.

    It does this on Wi-Fi and the mobile network.

    Is this because PHP is running on a Windows box and lacks some of the features of a Linux install?

    I’m not a programmer but I think that is basically what this post means:
    https://forums.zarafa.com/showthread.php?7005-Z-Push2-PHP-5-3-9-(remi)-reports-problem-with-shmop

    Do you know what’s causing this? Is there a work around?

  3. Q says:

    You should check your php.ini for:

    [sysvshm]
    ; A default size of the shared memory segment
    sysvshm.init_mem = 10000

    See if exists or if is commented. Above is the default value, you should have iy exacly like that.

  4. Jeff says:

    Thanks Q.

    I don’t know I did differently, but I started all over and now it’s working but I still get the following errors/alerts in z-push.log:
    [code]
    InterProcessData::InitSharedMem(): PHP libraries for the use shared memory are not available. Functionalities like z-push-top or loop detection are not available. Check your php packages.
    [/code]
    I also uncommented ‘sysvshm.init_mem = 10000’ and rebooted but it made no difference as far as I can tell.

    Are those errors/alerts anything to worry about?

  5. Q says:

    Not really but check your PHP version and your Z-push version. For PHP v5.4.x is recommended to have latest Z-push version. See here:
    http://zarafa-deutschland.de/z-push-download/final/2.0/

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*