Is it possible to have multiple versions of PHP running on the same box ( like rails ) . Here is my problem , I need to start development on a new project and was planning to use PHP 5.3 for it so that I can use the latest Zend framework and active record with it .
However the machine where I need to host my application has PHP 4.4 and there are several other applications hosted there . I do not want to upgrade the PHP version on the server as in the past I have faced a lot of issues while upgrading the PHP version and deprecated functions .
I was wondering if it is possible to have multiple version of PHP on the same box and then somehow specify the version that you want your application to load ( similar to rails )
Add a PHP Repository By default, Ubuntu 20.04 ships with the PHP version 7.4. So you'll need to add the PHP repository in your system to install the multiple PHP versions. Once the repository is up-to-date, you can proceed to install multiple PHP versions.
Yes we can run several versions of php. To do that we must have to check the INSTALL file, if it is included in PHP source distribution.
Yes, it is possible. In fact, many servers operate this way. You may see .php4 and .php5 extensions from time to time indicating which version that particular script should be handled with.
ServerFault addressed this question
Running php4 and php5 along side each other
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With