Different PHP Cli interpretations by Custom Build commands

jeffrey

Verified User
Joined
Sep 9, 2013
Messages
10
Hi!

The two commands below give two different installed CLI versions.

Code:
./build php n
./build update_versions

The PHP settings in options.conf

Code:
#PHP Settings
php1_release=7.2
php1_mode=php-fpm
php2_release=7.0
php2_mode=mod_php

Outcomes with ./build php n

Code:
# php -v
PHP 7.2.3 (cli) (built: Mar 26 2018 10:30:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Outcomes with ./build update_versions

Code:
# php -v
PHP 7.0.28 (cli) (built: Mar 26 2018 09:30:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

My first conclusion is that the doVersions() runs a php_expert [ doPhp_build $2 $3 ] instant of doPhp(). The reason why this difference is there is not (yet) clear to me. So two questions I have;

  1. How can we ensure that update_versions gives the right results?
  2. Can I get an explanation of the problem why there are two ways of PHP installations have been introduced in CustomBuild?
 
The issue is caused by php2_mode=mod_php, because it stores it's binary in /usr/local/bin/php location. I'll check what could be done from the code side for it. However, it's not a recommended configuration, because mod_ruid2 is redundant for php-fpm, and without mod_ruid2 your second instance of PHP would run under apache user privileges.
 
Back
Top