Re: Re: two php.ini on the same server

From: Date: Fri, 26 Jan 2007 15:59:05 +0000
Subject: Re: Re: two php.ini on the same server
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-247830@lists.php.net to get a copy of this message
zerof wrote:
phpdevster escreveu:
Hi i am trying to run two Apache server on the same machine and that is work fine but the problem is how to create separate php.ini for each Apache server . is that possible ??
Two usual possibilities: 1) To install two Apache Services ( Windows environment ) Apache 1.3.xx running php 4 Apache 2 running php 5 http://www.educar.pro.br/ 2) To use only one Apache2 Service Setting two virtual hosts, one for php4 and other for php5 http://foundationphp.com/tutorials/apache22_vhosts.php I've done this (1) on linux and it works fine, php 4 on 1.3xx and 5 php 5 on apache 2. I believe the reason this works is that you have two php executables, each with unique configurations. So, if you, say, wanted to have php 5 running two apache servers, it would probably work if you recompile php 5 and install it into a new directory. I have no experience with windows. But here are some notes for installing on linux/unix machines:
If your system already came with a pre-installed php 5 executable, then when you download and compile the new php 5, it will automatically install in /usr/local. But if you had previously compiled php 5 and it is already in /usr/local, you might want to install in a new directory, which you can do by feeding configure a new prefix: ./configure --prefix=/usr/local/new_install_directory You might also want to feed configure a path for the php.ini file: ./configure --prefix=/usr/local/new_install_directory --with-config-file-path=PATH But if you don't, php.ini will automatically be installed in PREFIX/lib:
      /usr/local/new_install_directory/lib
You will have to read the INSTALL file that comes with the distribtution, becaue you also have to set a few other basic values for configure to work with. -- _____________________ Myron Turner http://www.room535.org http://www.bstatzero.org http://www.mturner.org/XML_PullParser/

« previous php.general (#247830) next »