PHP 5.2?


I just install Virtualmin on my server and I must thank you for such great job
but I have a problem running a php script, it seems that it have some issues with the recent PHP versions (5.3 and later)
I would like to know if it is possible to install php 5.2 in my server?



Normally, we suggest using the PHP version that’s included with your distro/version.

Which distro/version is it that you’re using though?


Thanks for your answer

I really can’t use the php version included with distro(5.3) because it is not compatible with the script I’m trying to run

I’m using centos 6 64bit


There isn’t a Virtualmin-recommended way of installing an older PHP version onto a distro.

We would recommend installing a distro that contains the PHP version you need, or updating the app in question to support PHP 5.3.

Note that PHP 5.2 has reached it’s end of life, and even PHP 5.3 is being phased out.

However, if you really need PHP 5.2, there are some third party repositories that users have had success with containing alternate PHP versions.

We’d suggest installing that onto a test server before attempting that on your live server, as software from third party repositories can sometimes cause problems.


You could even, to maintain security, install php 5.2 to a different directory and have only that virtual server use php 5.2. Sorry I can’t provide more details about how to do this currently. But basically you compile it from source and change the f.cgi script in the cgi-bin of the virtual servers home directory to point to the 5.2 binaries.