Re: Can 4.x and 5.0 coexist on the same machine?

From: Date: Wed, 04 Aug 2004 21:35:23 +0000
Subject: Re: Can 4.x and 5.0 coexist on the same machine?
References: 1 2  Groups: php.install 
Request: Send a blank email to php-install+get-14049@lists.php.net to get a copy of this message
Of course you can. You can even run them at the same time. This is the trick. PHP 4.X Install Apache 1.3.X or 2.0.X from source in: /usr/local/apache Install PHP 4.x as a dynamic module of this apache (apxs or apxs2) Configure this apache to listen on port 80 (default) PHP 5.X Install Apache 1.3.X or 2.0.X from source in: /usr/local/apache5 (or any other diferent from above) Install PHP 5.x as a dynamic module of this apache (apxs or apxs2) Configure this apache to listen on port 8080 (diferent from above) You can have both virtualhost point to the same path. /virtualhost/yourdomain/www/ You can call it from your browser specifying the port localhost (same as: localhost:80) localhost:8080 Reference: http://www.php.net/manual/en/install.apache.php http://www.php.net/manual/en/install.apache2.php > On Tue, 2004-08-03 at 22:57, Daniel Lahey wrote: >> I'm wondering if it's possible to have 4.x and 5.0 installed on the >> same machine and to be able to switch between them. I'm running Mac >> OS X 10.3.4. Could I create another account which uses 5.0 and log >> on using that account when I want to use that version? Forgive me >> for not doing the research myself, but I've found it difficult to >> find any information on this and thought someone might have already >> been through the process. >> >> Thanks. >> > > I have not tried it, but I would think it possible. PHP is part of the > webserver so its nothing to do with the client side of things. Logging > in as a different user would not change the webserver. If you compiled > php as an Apache module, with the source code in two separate > directories then having both these lines in httpd.conf: > LoadModule php4_module modules/libphp4.so > LoadModule php5_module modules/libphp5.so > but with one commented out might work. When you wanted to swap over, > uncomment the one you want and comment out the other, then restart the > webserver. > > Now this is only a suggested possiblilty, so it may not work. I've not > tried OSX either. > > I guess the question I would ask is do you _need_ both versions? > > Hope this helps > > Chris -- Jorge Alberto Reteguín Pimentel jorge@reteguin.com

« previous php.install (#14049) next »