Koozali.org: home of the SME Server

zarafa and php5

Offline sainsuper

  • 7
  • +0/-0
zarafa and php5
« on: January 25, 2011, 12:50:40 PM »
hello guys
i use zarafa with sme server from 2 years, but newest version need php5 for working correctly,
i have installed php5 contrib and all ibays work good, but how can i enable php5 for zarafa? (it is non istalled in opt like other contrib) if i made a phpinfo i see php 4.3.
thanks for reply
sainsuper

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: zarafa and php5
« Reply #1 on: March 29, 2011, 03:31:24 AM »
I have run into the same problem. I am running SME 7.5.1 updated. I have installed the php5-cgi contrib. I have tried to enable php5 for zarafa by creating a custom template containing

Code: [Select]
<Directory /etc/zarafa>
       AddHandler php5-cgi .php
       Action php5-cgi /php5-cgi/php-cgi
</Directory>

php5 is needed by zarafa to open attachments in webaccess. I am using the latest version of zarafa.
TIA
« Last Edit: March 29, 2011, 03:33:47 AM by crazybob »
If you think you know whats going on, you obviously have no idea whats going on!

Offline sainsuper

  • 7
  • +0/-0
Re: zarafa and php5
« Reply #2 on: April 01, 2011, 12:35:10 PM »
i have (after many many time) enable zarafa whith php5, but there is a problem, sme 7.5.1 use php 5.3.2, and zarafa 6.40.x mapi.so work only on php 5.1(mapi.so is compiled for php5.1), i have written in zarafa forum too, but i haven't found a solution.

http://forums.zarafa.com/viewtopic.php?f=13&t=6053

regard
SainSuper

Offline johnp

  • ****
  • 312
  • +0/-0
Re: zarafa and php5
« Reply #3 on: April 01, 2011, 01:19:48 PM »

Offline frifri

  • *
  • 108
  • +0/-0
Re: zarafa and php5
« Reply #4 on: April 04, 2011, 01:39:45 AM »
Hi,

For php 5.2, i did this on a 7.5.1-smeserver (after install of the php5-contrib (then is was 5.2)) :

For php 5.2, one can use the mapi-files of the opensuse-10.2-tar.gz  (if you have windows, use 7-zip to extract zcp-6.40.*-suse-10.2-i586-free.tar, after that : zarafa-6.40.*.i586.rpm, after that extract zarafa-6.40.*.cpio.bz2 and then zarafa-6.40.*.cpio).
You get 3 directories : /etc /usr /var

copy /usr/lib/php5/extensions/mapi.so to /usr/lib/php5/ on your smeserver 7.5.1
copy /usr/share/php/mapi/*-files to the /usr/share/php/mapi/-directory of your smeserver 7.5.1

For php 5.3, i expect you can use the mapi-files of a distribution that uses standard php5.3 (didn't test it)

Change /etc/e-smith/templates/etc/php5/php.ini/40DataHandling :

Code: [Select]
magic_quotes_gpc                       = Off
Code: [Select]
expand-template /etc/php5/php.ini

Code: [Select]
cp /etc/php.d/zarafa.ini /etc/php5/php5.d/zarafa.ini
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/90zarafa

In 90zarafa, put :

Code: [Select]
<Directory /usr/share/zarafa-webaccess>
       AddHandler php5-cgi .php
       Action php5-cgi /php5-cgi/php-cgi
</Directory>
<Directory /usr/share/zarafa-webaccess-mobile>
       AddHandler php5-cgi .php
       Action php5-cgi /php5-cgi/php-cgi
</Directory>

Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
Code: [Select]
httpd -t
Code: [Select]
svc -t /service/httpd-e-smith
« Last Edit: April 04, 2011, 01:46:04 AM by frifri »

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: zarafa and php5
« Reply #5 on: April 04, 2011, 06:02:01 AM »
Thanks very much frifri.
I removed php5-cgi 5.3.2, and installed php5-cgi5.2, followed your instructions, and things work great.
If you think you know whats going on, you obviously have no idea whats going on!

Offline frifri

  • *
  • 108
  • +0/-0
Re: zarafa and php5
« Reply #6 on: April 04, 2011, 09:18:10 AM »
Did somebody test the mapi-files for RHEL 6 and php 5.3 ?

In this senario i think you don't need the 'magic_quotes_gpc = Off' in '/etc/e-smith/templates/etc/php5/php.ini/40DataHandling'

F.

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: zarafa and php5
« Reply #7 on: April 04, 2011, 02:54:52 PM »
I just tried it, and mapi.so requires glibc 2.5 or higher, so that won't work. It also said it needed magic_quotes_gpc = Off.
for now I can stick with php5.2.
If you think you know whats going on, you obviously have no idea whats going on!

Offline sainsuper

  • 7
  • +0/-0
Re: zarafa and php5
« Reply #8 on: April 19, 2011, 12:06:27 PM »
hi crazybob,
how i can return to php 5.2 ? what are steps to do?
regard
sainsuper

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: zarafa and php5
« Reply #9 on: April 19, 2011, 01:04:36 PM »
I removed the php5.3 rpms, using the reomve packages in server manager, the then installed the php5.2 prms

I found the php5.2 rpms at http://through-ip.com/packages/smeserver/i386/. I just checked and they are available there.
If you think you know whats going on, you obviously have no idea whats going on!

Offline sainsuper

  • 7
  • +0/-0
Re: zarafa and php5
« Reply #10 on: April 21, 2011, 12:27:52 AM »
sorry crazybob,
i have'nt many experience...
i have removed 5.3 from panel, but how i can install 5.2?
can you describe me step to step?
sorry and thanks again

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Re: zarafa and php5
« Reply #11 on: April 21, 2011, 01:52:09 AM »
open a terminal window as root
Code: [Select]
mkdir php5.2
Code: [Select]
cd php5.2
Code: [Select]
wget http://www.srdpc.com/php5.2/php5-cgi-5.2.8-2.el4.sme.i386.rpm
Code: [Select]
wget http://www.srdpc.com/php5.2/php5-cgi-imap-5.2.8-2.el4.sme.i386.rpm
Code: [Select]
wget http://www.srdpc.com/php5.2/php5-cgi-ldap-5.2.8-2.el4.sme.i386.rpm
Code: [Select]
wget http://www.srdpc.com/php5.2/php5-cgi-mysql-5.2.8-2.el4.sme.i386.rpm
Code: [Select]
wget http://www.srdpc.com/php5.2/php5-cgi-pear-5.2.8-2.el4.sme.i386.rpm
Code: [Select]
wget http://www.srdpc.com/php5.2/php5-cgi-xmlrpc-5.2.8-2.el4.sme.i386.rpm
Code: [Select]
wget http://www.srdpc.com/php5.2/smeserver-php5-cgi-1.0-2.el4.sme.noarch.rpm
After the files are all downloaded install the rpms with

Code: [Select]
yum localinstall *.rpm
Then
Code: [Select]
signal-event post-upgrade ; signal-event reboot
That should be it

Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline sainsuper

  • 7
  • +0/-0
Re: zarafa and php5
« Reply #12 on: April 21, 2011, 01:02:25 PM »
thanks crazybob and frifri very much.
with your support now i can open attachment in zarafa 6.40.7!
thanks you again
SainSuper