I use Virtualmin server on Ubuntu 14. I have some scripts who need to run with PHP 5.3. In order to have PHP 5.3, I compile PHP 5.3.29 with pbpbrew. Then I create a symlinks to the build folder and I copy the build folder but Virtualmin dont find the new PHP version in /opt/rh/php53.
Message from Virtualmin refresh information : The following PHP versions are available : 5.5.12 (/usr/bin/php5-cgi)
More information :
phpbrew (latest version)
php v5.3.29
build folder : /root/.phpbrew/build/php-5.3.29
Folder group/owner : syslog uuidd
Symlink : /opt/rh/php53
What could I do to have PHP 5.3 working in Virtualmin ??
This is the section of code that looks for PHP versions:
# For a version like 5.4, check for binaries like php54 and
# /opt/rh/php54/root/usr/bin/php
$phpn ||= &has_command("php$VERSION-cgi") ||
&has_command("php-cgiVERSION") ||
&has_command("/opt/rh/php$VERSION/root/usr/bin/php-cgi") ||
&has_command("/opt/atomic/php$VERSION/root/usr/bin/php") ||
&has_command("/opt/rh/php$VERSION/bin/php-cgi") ||
&has_command("php$VERSION") ||
&has_command("/opt/rh/php$VERSION/root/usr/bin/php");
&has_command("/opt/rh/php$VERSION/bin/php") ||
&has_command(glob("/opt/phpfarm/inst/bin/php-cgi-$VERSION.*"));
You’d want to make sure that your PHP path matches one of the above.
For example, putting it in /opt/rh/php53/bin/php or /opt/rh/php53/bin/php-cgi is a common way of doing that.