Re: Php 4 and Php 5 on same box

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The solution depends on the Webserver you are using,
i think for Apache2.x there should be no big problem at all to 
use php4 and php5 concurrently - just search the web.

For Apache1.3.x you can look here:
http://www.schlitt.info/applications/blog/archives/83_How_to_run_PHP4_and_PHP_5_prallel.html

I use for my Apache 1.3 Testserver a really simple solution:
- PHP4 is installed as a module
- PHP5 is compiled as CGI

this is my php5 config:
'./configure' '--with-zlib' '--with-bzip' '--with-gd' 
'--enable-force-cgi-redirect' '--prefix=/usr/local/php5' '--enable-bcmath' 
'--enable-calendar' '--enable-ctype' '--enable-dbase' '--enable-discard-path' 
'--enable-exif' '--enable-filepro' '--enable-ftp' '--enable-gd-imgstrttf' 
'--enable-gd-native-ttf' '--enable-inline-optimization' 
'--enable-magic-quotes' '--enable-mbstr-enc-trans' '--enable-mbstring' 
'--enable-mbregex' '--enable-memory-limit' '--enable-safe-mode' 
'--enable-shmop' '--enable-sigchild' '--enable-sysvsem' '--enable-sysvshm' 
'--enable-track-vars' '--enable-trans-sid' '--enable-versioning' 
'--enable-wddx' '--with-bz2' '--with-dom=/usr/include/libxml2' '--with-ftp' 
'--with-gdbm' '--with-gettext' '--with-gmp' '--with-jpeg-dir=/usr' 
'--with-mcal=/usr' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' 
'--with-ndbm' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--with-ttf' 
'--with-freetype-dir=yes' '--with-xml' '--with-xpm-dir=/usr/X11R6' 
'--with-zlib=yes' '--with-qtdom=/usr/lib/qt3' '--with-gd' '--with-openssl' 
'--with-curl' '--enable-xslt' '--with-xslt-sablot' '--with-iconv' '--with-mm' 
'--enable-dba' 

Both PHP versions reside in different directories and use different php.ini's.

To use PHP5 i simply put a .htaccess file like this in the root of the 
php5-project-directory:

Action php5-script /cgi-php5/php
AddHandler php5-script .php
Options +ExecCGI

Additionally i added this directive to my apache httpd.conf:

 ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
    ScriptAlias /cgi-php5/ "/usr/local/php5/bin/"
    <Directory "/usr/local/php5/bin">
       Options +ExecCGI
       Allow From All
    </Directory>

for my testenvironment, this works good enough.

Dirk


Am Donnerstag, 28. Oktober 2004 09:26 schrieb Dave Carrera:
> Hi List,
>
> I have php 4 running all ok on a freebsd box installed from ports.
>
> What I would like to do is install php5 with all modules so's not to over
> right the php4 install and tell my users that they can test their scripts
> against the new php5 by including the path to php5 in their scripts before
> I make it the main php running on my box.
>
> I would really appreciate a simple (no brainer) set of steps to achieve
> this & I ask the clever guys here to offer their pearls of wisdom.
>
> I thank anyone who helps with this fully in advance.
>
> Dave C
>
>
> --
> UK Web Hosting @ http://www.ephgroup.com
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.783 / Virus Database: 529 - Release Date: 25/10/2004

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux