How to make php5 on a php4 machine without breaking anything
I know that with python and a few other languages there is a way to safely make a new generational version of the language installed on the machine, but after you wade through PHP5 configure and makefile, the only thing I saw was the dir option prefix and ini search path.
Ideally I would like php5 to have its own lib / bin subdirectories in / usr / local, and then I can just put php5 after php4 in the path, or make a symlink from php5 binaries to php5-cli, php5-cgi, etc. .d.
Also, I don't see anything wrong here, the server in question is a legacy app server still somewhat busy and should be outdated by June 2009, but at the same time it is planned to start updating parts with php5 code.
Machine state: CENTOS 5 PHP 4 was built from an original RPM outside of yum control
Most php4 are in ambiguous directories: / usr / {include, lib} / php
source to share
The cli version should be lightweight
configure --prefix=/usr/local/php5
make install-cli
It is not possible to run PHP4 and PHP5 as a module together on the same Apache server. But it is possible to run php version X as a module and Y version as cgi. It can also be run as cgi.
I found these step by step tutorials:
source to share