Click to See Complete Forum and Search --> : Running 2 php versions...


felipe_lopes
11-02-2003, 12:13 PM
Hi there!

Is it possible to run on my machine 2 php versions?

I've tried to download other webserver and install the other php version on it but came out wrong.

What I want is to test php 5 without uninstalling the php I'm using right now...Is it possible??

Thanks in advance!

codeDV
11-02-2003, 01:05 PM
On unix I its as easy as copying the PHP.ini and creating a small shell script and setting it up to use them from Apache. I do it on my unix system as I have three virtual hosts - each of which uses it own PHP.ini .

Shell Script:
#!/bin/sh

/usr/local/lib/php -c /path/to/php.ini $1

You'll need to change change the path accordingly in your Apache configuration. For example if you shell script is kept in your CGI-BIN and called php you would use the following:

# php cgi config
AddType application/x-httpd-php .php
Action application/x-httpd-php "/cgi-bin/php"


I'm not sure whether this carries any security concerns. As long as that shell script is outside the document root and has only read and execute permissions it should be fine.

felipe_lopes
11-02-2003, 03:38 PM
Thanx codeDV!

But I forgot to say that I'm under win98!

Is there any way to do this under win plataform?

thanx again!