Php-SCL

Available NS6 and NS7

Nethserver is a distro based on Centos which have a php version not easy to upgrade, or really not recommended to do. This rpm which will install beside the default version all needed rpm from remi repository to use other versions of PHP.

Stephane de Labrusse at stephdl@de-labrusse.fr

Is this Module helpful to you ? Please consider donating

NS6

php54, php55, php56, php70

NS7

php56, php70, php71

NS6 Installation

  • Stephdl Repo

First you need to install my repository, see how to do it

  • Install EPEL Repo
  yum localinstall http://ftp.heanet.ie/pub/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

Disable it:

eorepo centos-base centos-updates nethserver-base nethserver-updates nethforge
  • Install the remi repository
  yum install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  • Install the module
yum install nethserver-php-scl --enablerepo=stephdl,epel

NS7 Installation

  • Stephdl Repo

First you need to install my repository, see how to do it

  • Install the remi repository
  yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
  • Install the module
  yum install nethserver-php-scl --enablerepo=stephdl

Normally the Panel should be complete and you should not use the command Line, if you think that we can enhance the PHP settings by bringing more options, please ask.

the settings are in two places

  • in the Shared Folder (NS6) or in the Virtualhost (NS7) panel

Here you can decide which version you will use for the Ibay/virtualhost (default means the php version of Apache). Since we use a CGI script to handle the php version, you won't be able to trigger php settings with the module nethserver-phpsettings, you have to adjust settings by the relevant php.ini. I wanted to code something cool so all settings are not db command based….I bring a panel…you must go to the 'Php Settings' in the configuration panel.

  • In the Php Settings Panel

Here you can decide which version you want to use for the whole server. When Apache is the Handler of Php then you can trigger php settings with my other module nethserver-phpsettings. In other word if you want to use the module nethserver-phpsettings and you need a specific version of Php, you must use that version for the whole Server. Of course you can go back to the default version if something goes wrong with an old web application.

In other parts of the Panel you can adjust php settings to all different versions of Php, even the Php53 default centos version.

Upgrade Rpms

All php versions come from the remi repository and are installed in the /opt.

  • NS6

We use for NS6 the remi-safe repository, it means that it is enabled by default, do simply 'yum update' in your terminal.

  • NS7

We use for NS7 the remi-safe repository, it means that it is enabled by default, do simply 'yum update' in your terminal.

Install php Rpms

All php rpm must be installed directly from Remi by a yum command line(think that you might need to enable epel).
For example if you want to display all available rpm for the software collection

  • NS6
  yum list available php* --disablerepo=* --enablerepo=remi-safe

If you want to install a rpm for all php version (php54,php55,php56,php70)

yum install php54-php-dba php55-php-dba php56-php-dba php70-php-dba --enablerepo=epel
  • NS7
  yum list available php* --disablerepo=* --enablerepo=remi-safe

If you want to install a rpm for all php version (php56,php70,php71)

  yum install php56-php-dba php70-php-dba php71-php-dba 

* with NS6

For php70 and php71 if you use php70 or php71 as the default php version (apache handler), you cannot use another version for an Ibay, the default will be forced to php70 or php71 even if you make another choice in the Ibay panel.

This is done because you have an incompatibility between modphp5 and modphp7

NOT RELEVANT FOR NS7

The php.ini must be adjusted by a custom-template else the next update of the rpm will erase your changes.

  • for ns6 you will find the templates at :
/etc/e-smith/templates/opt/remi/php54/root/etc/php.ini/
/etc/e-smith/templates/opt/remi/php55/root/etc/php.ini/
/etc/e-smith/templates/opt/remi/php56/root/etc/php.ini/
/etc/e-smith/templates/etc/opt/remi/php70/php.ini/
/etc/e-smith/templates/etc/opt/remi/php71/php.ini/
  • for ns7 you will find the templates at :
/etc/e-smith/templates/opt/remi/php56/root/etc/php.ini/
/etc/e-smith/templates/etc/opt/remi/php70/php.ini/
/etc/e-smith/templates/etc/opt/remi/php71/php.ini/

then issue in the terminal after you have created your custom-template

signal-event nethserver-php-scl-update

Please raise Issues on github