Koozali.org: home of the SME Server

Is there a way to install PHP5 "with" PHP4

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Is there a way to install PHP5 "with" PHP4
« on: February 16, 2007, 04:45:54 AM »
Some of us are using EGROUPWARE and this software needs PHP5 to sync with Outlook...

Is there a way to have PHP5 but keep PHP4 intact?

The egroupware team says:
Quote
but you can run php5 as a cgi and leave php4 as an apache module

    
How to setup a SyncML server using eGroupWare
SyncML should be working out of the box, when your webserver fulfills following requirements:

    * Apache Webserver (tested with Apache 1.3 and Apache 2.0)
    * PHP5(PHP4 does not work, but you can run php5 as a cgi and leave php4 as an apache module. see below)
    * Pear needs to be installed
    * Pear::Log needs to be installed
    * eGroupWare 1.2

You can verify that your server fulfills the requirements, be using the setup module of your eGroupWare installation.

Some additional notes:
PHP5 as an Apache Module
SyncML requires PHP5. It will not work with PHP4 installed. Currently we have tested SyncML with PHP 5.0.X as Apache module.

You need to add following lines to your apache configuration:

<Location /egroupware/rpc.php>
php_value mbstring.func_overload 0
Order allow,deny
Allow from all
</Location>

If you are using the RPM's, we have added this statement already for you.

PHP5 as a CGI
If you need to keep PHP4 as a module, but still want to have SyncML, you will need to run PHP5 as a CGI. You will need to install PHP5 CGI, PHP5 MySQL/PSQL (depending on which you are using) and PHP5 LDAP if you are using LDAP.

You need to add following lines to your apache configuration:

<Location /egroupware/rpc.php>
Order allow,deny
Allow from all
AddHandler php5-script .php
Action php5-script /cgi-bin/php5
</Location>

Notice that php_value mbstring.func_overload 0 is missing. That is because php_value mbstring.func_overload 0 is the default behaviour of php.



I found this reference:
http://seekbrain.com/2006/01/20/php4-php5-mysql-rpms-released/

with those 2 files:
http://www.seekbrain.com/downloads/psa/4ES/php5-cgi-pear-5.1.2-1.sp.i386.rpm
http://www.seekbrain.com/downloads/psa/4ES/php5-cgi-5.1.2-1.sp.i386.rpm

It would have /etc/httpd/conf.d/php5.conf
Code: [Select]
#Alias /php5-cgi /usr/bin/php5
#AddHandler php5-script .php5
#Action php5-script /php5-cgi/php
AddHandler cgi-script .php5
Options -Includes -ExecCGI to Options -Includes +ExecCGI



Anyone able to do this on SME7 ?
Sophie from Montréal

Offline cool34000

  • *
  • 339
  • +0/-0
Is there a way to install PHP5 "with" PHP4
« Reply #1 on: February 16, 2007, 04:10:59 PM »
Hi, I'm using default PHP v4 installed on SME and eGroupWare successfully.
I'm using eGWOsync to synchronize Outlook and eGroupware and it works very well... It uses XMLRPC

See my howto
What you are looking for is on page 2