PHP Switching
In order to switch between PHP versions environoment variable PHP_SELECT is set to the selected PHP version. Valid values are php53, php54, php55, php56, php70 and php71.
To ensure correct PHP configuration file is used environoment variable PHP_INI_SELECT is set to the selected PHP configuration file. Valid values are php_test.ini, php_development.ini and php_production.ini.
The PHP_SELECT environment variable is used in the Apache configuration file httpd.conf to select the appropriate configuration block that inturn selects a configuration file (php53.conf - php71.conf).
Within the selected configuration file (php53.conf - php71.conf) environment variable PHP_INI_SELECT selects the PHP configuration file to use.
The Apache configuration code for PHP switching is shown on the right.
Note: Configuration file (php53.conf - php71.conf) is installed when a corresponding PHP module is installed.
PHP Plugins
Related to PHP switching, when installing a plugin for an existing PHP series (PHP 53, 54, 55, 56, 70 or 71) it is assumed you want to use it instead of the one currently installed. This allows you to revert back to an older version number within the same PHP series.
|
Apache configuration file: UniServerZ\core\apache2\conf\httpd.conf
# Environment variable ${PHP_SELECT} has a value of php52,
# php53, php54, php55 or php56. It is used in the following
# five define statements to select a PHP version to
# load as a module.
Define ${PHP_SELECT}
<IfDefine php53>
Include ${US_ROOTF}/core/apache2/conf/extra_us/php53.conf
</IfDefine>
<IfDefine php54>
Include ${US_ROOTF}/core/apache2/conf/extra_us/php54.conf
</IfDefine>
<IfDefine php55>
Include ${US_ROOTF}/core/apache2/conf/extra_us/php55.conf
</IfDefine>
<IfDefine php56>
Include ${US_ROOTF}/core/apache2/conf/extra_us/php56.conf
</IfDefine>
<IfDefine php70>
Include ${US_ROOTF}/core/apache2/conf/extra_us/php70.conf
</IfDefine>
<IfDefine php71>
Include ${US_ROOTF}/core/apache2/conf/extra_us/php71.conf
</IfDefine>
Apache config file: UniServerZ\core\apache2\conf\extra_us\php53.conf
LoadFile ${US_ROOTF}/core/php53/libsasl.dll
LoadFile ${US_ROOTF}/core/php53/icudt55.dll
LoadFile ${US_ROOTF}/core/php53/icuin55.dll
LoadFile ${US_ROOTF}/core/php53/icuio55.dll
LoadFile ${US_ROOTF}/core/php53/icule55.dll
LoadFile ${US_ROOTF}/core/php53/iculx55.dll
LoadFile ${US_ROOTF}/core/php53/icutu55.dll
LoadFile ${US_ROOTF}/core/php53/icuuc55.dll
# Load PHP module and add handler
LoadModule php5_module "${US_ROOTF}/core/php53/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "${US_ROOTF}/core/php53/${PHP_INI_SELECT}"
Apache config file: UniServerZ\core\apache2\conf\extra_us\php54.conf
LoadFile ${US_ROOTF}/core/php54/libsasl.dll
LoadFile ${US_ROOTF}/core/php54/icudt55.dll
LoadFile ${US_ROOTF}/core/php54/icuin55.dll
LoadFile ${US_ROOTF}/core/php54/icuio55.dll
LoadFile ${US_ROOTF}/core/php54/icule55.dll
LoadFile ${US_ROOTF}/core/php54/iculx55.dll
LoadFile ${US_ROOTF}/core/php54/icutu55.dll
LoadFile ${US_ROOTF}/core/php54/icuuc55.dll
# Load PHP module and add handler
LoadModule php5_module "${US_ROOTF}/core/php54/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "${US_ROOTF}/core/php54/${PHP_INI_SELECT}"
Apache config file: UniServerZ\core\apache2\conf\extra_us\php55.conf
LoadFile ${US_ROOTF}/core/php55/libsasl.dll
LoadFile ${US_ROOTF}/core/php55/icudt55.dll
LoadFile ${US_ROOTF}/core/php55/icuin55.dll
LoadFile ${US_ROOTF}/core/php55/icuio55.dll
LoadFile ${US_ROOTF}/core/php55/icule55.dll
LoadFile ${US_ROOTF}/core/php55/iculx55.dll
LoadFile ${US_ROOTF}/core/php55/icutu55.dll
LoadFile ${US_ROOTF}/core/php55/icuuc55.dll
# Load PHP module and add handler
LoadModule php5_module "${US_ROOTF}/core/php55/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "${US_ROOTF}/core/php55/${PHP_INI_SELECT}"
Apache config file: UniServerZ\core\apache2\conf\extra_us\php56.conf
LoadFile ${US_ROOTF}/core/php56/libsasl.dll
LoadFile ${US_ROOTF}/core/php56/icudt54.dll
LoadFile ${US_ROOTF}/core/php56/icuin54.dll
LoadFile ${US_ROOTF}/core/php56/icuio54.dll
LoadFile ${US_ROOTF}/core/php56/icule54.dll
LoadFile ${US_ROOTF}/core/php56/iculx54.dll
LoadFile ${US_ROOTF}/core/php56/icutest54.dll
LoadFile ${US_ROOTF}/core/php56/icutu54.dll
LoadFile ${US_ROOTF}/core/php56/icuuc54.dll
# Load PHP module and add handler
LoadModule php5_module "${US_ROOTF}/core/php56/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "${US_ROOTF}/core/php56/${PHP_INI_SELECT}"
Apache config file: UniServerZ\core\apache2\conf\extra_us\php70.conf
LoadFile ${US_ROOTF}/core/php70/libsasl.dll
LoadFile ${US_ROOTF}/core/php70/icudt56.dll
LoadFile ${US_ROOTF}/core/php70/icuin56.dll
LoadFile ${US_ROOTF}/core/php70/icuio56.dll
LoadFile ${US_ROOTF}/core/php70/icule56.dll
LoadFile ${US_ROOTF}/core/php70/icuuc56.dll
# Load PHP module and add handler
LoadModule php7_module "${US_ROOTF}/core/php70/php7apache2_4.dll"
AddHandler application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "${US_ROOTF}/core/php70/${PHP_INI_SELECT}"
Apache config file: UniServerZ\core\apache2\conf\extra_us\php71.conf
LoadFile ${US_ROOTF}/core/php71/libsasl.dll
LoadFile ${US_ROOTF}/core/php71/icudt57.dll
LoadFile ${US_ROOTF}/core/php71/icuin57.dll
LoadFile ${US_ROOTF}/core/php71/icuio57.dll
LoadFile ${US_ROOTF}/core/php71/icule57.dll
LoadFile ${US_ROOTF}/core/php71/iculx57.dll
LoadFile ${US_ROOTF}/core/php71/icuuc57.dll
# Load PHP module and add handler
LoadModule php7_module "${US_ROOTF}/core/php71/php7apache2_4.dll"
AddHandler application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "${US_ROOTF}/core/php71/${PHP_INI_SELECT}"
|