Jochem Maas <[EMAIL PROTECTED]> writes: > Alexey Zakhlestin schreef: >> On Mon, Sep 8, 2008 at 12:11 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: >> >>> if anyone knows of some details info on how to >>> keep multiple installs of >>> php around (including apache modules) and being able to switch between them >>> with minimal fuss then >>> I be very happy to learn! >> >> the easiest option is to use different prefix-paths for php >> >> default installation: ./configure --prefix=/usr/local >> some custom installation: ./configure --prefix=/opt/php53-test > > I do this already, only the apache module, if compiled, is always installed > where > apxs2 says it should be put ... ergo it overwrites the version that I > consider/use > as default/production.
I use symlinks for that. I have a symlink /usr/local/php-active which points to e.g /usr/local/php-5.2.6 (the stable version) (php is compiled with --prefix=/usr/local/php-5.2.6) /usr/local/bin/php is a symlink which points to /usr/local/php-active/bin/php. So I am sure if I call php from the commandline that the right php version gets called. For the apache module my makefile with which I compile php renames the .so file to another name and I have another symlink libphpactive.so which points to that lib. So if I want to upgrade I compile a new php version, test it from the command line and fpr apache I use a test process which has the same docroot as the production server but uses the newly build php lib. If all goes well I change two symlinks, restart Apache and am finished. If I saw later problems I could easily jump back to an earlier version by changing these two symlinks. (I compile php as DSO; if you compile PHP as statically bound Apache module it's the same. Just put every Apache version in an own directory and have a symlink which points to the version you want for production.) Bye KP -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php