Recognize more php versions

Howdy,

I've been searching a solution to make virtualmin recognize own php versions at /opt/ as we are not on Redhat (which is supported) but on Debian Wheezy.

My preferred solution would be that virtualmin recognizes every installed php version from phpfarm: https://github.com/fpoirotte/phpfarm

The structure of the installed phpfarm binaries is:

/opt/phpfarm/inst/bin/php-cgi-5.3.27
/opt/phpfarm/inst/bin/php-cgi-5.5.9
/opt/phpfarm/inst/bin/php-cgi-5.2.17

(every other version possible).

As workaround I use at the moment a link structure ...

/opt/php/5.3/php-cgi -> /opt/phpfarm/inst/bin/php-cgi-5.3.27
/opt/php/5.2/php-cgi -> /opt/phpfarm/inst/bin/php-cgi-5.2.17
/opt/php/5.5/php-cgi -> /opt/phpfarm/inst/bin/php-cgi-5.5.9

together with a construct added in php-lib.pl at line 746:

# For CGI and fCGId modes, check which wrappers could exist
foreach my $v (@all_possible_php_versions) {
        local $phpn;
        if ($gconfig{'os_type'} eq 'solaris') {
                # On Solaris with CSW packages, php-cgi is in a directory named
                # after the PHP version
                $phpn = &has_command("/opt/csw/php$v/bin/php-cgi");
                }
-->     $phpn = &has_command("/opt/php/$v/php-cgi");   <---
        $phpn ||= &has_command("php$v-cgi") || &has_command("php$v");

It would be nice to have

  • a module config option to give a path where to search for php versions, and/or
  • something like pattern matching to find all php*cgi*$v binaries.

Thanx in advance Falko

Status: 
Closed (fixed)

Comments

Sure, I can add detection for those paths. Another work-around till then would be to create symlinks to them, like :

ln -s /opt/phpfarm/inst/bin/php-cgi-5.3.27 /usr/local/bin/php53

ah ok, thanx, that's a solution if I have only one binary per 5.x php version.

I've recognized another problem: in fcgi-bin/php-5.X.fcgi is set:

PHPRC=$PWD/../etc/php5.2

but virtualmin does not create this dir, instead I had to manually rename this dir from php5 to php5.2 when using another php version.

Is this a configuration issue or how could this automagically be done when changing php version in vhost?

Many thanx Falko

Unfortunately Virtualmin doesn't support more than one 5.x.y sub-version currently.

Why would you need this though?

Automatically closed -- issue fixed for 2 weeks with no activity.