Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
php-scl [2019/03/04 05:38]
HF
php-scl [2019/10/27 08:49] (current)
Stephane de Labrusse [NS7 Installation]
Line 35: Line 35:
   * Install the module   * Install the module
  
-  yum install nethserver-php-scl --enablerepo=stephdl,​epel+  yum install nethserver-php-scl --enablerepo=stephdl,​epel,remi-safe
  
  
Line 51: Line 51:
  
 <​file>​ <​file>​
-  yum install nethserver-php-scl --enablerepo=stephdl+  yum install nethserver-php-scl --enablerepo=stephdl,remi-safe
 </​file>​ </​file>​
   ​   ​
Line 60: Line 60:
 the settings are in two places the settings are in two places
  
-  * in the Shared Folder (NS6) or in the Virtualhost (NS7) panel+  * in the Shared Folder (NS6)
  
 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. 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+* in the Shared Folder (NS7) 
 + 
 +please upgrade to NS7, here now you run a dedicated instance of phpscl for each Vhost and obviously we can set specific values to this vhost 
 + 
 +  ​* In the Php Settings Panel (NS6)
  
 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. 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 the Php Settings Panel (NS7)
 +
 +Here you can decide which version you want to use for the default /​var/​www/​html. 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. In other parts of the Panel you can adjust php settings to all different versions of Php, even the Php53 default centos version.
Line 143: Line 151:
 signal-event nethserver-php-scl-update signal-event nethserver-php-scl-update
 </​file>​ </​file>​
 +
 +
 +=====Adjust php-fpm pool====
 +
 +with ns7 you can adjust directly some parameters by creating a file, for example if  you have created a virtualhost called wordpress, then you will find all the configuration at `/​etc/​opt/​remi/​php73/​php-fpm.d/​php-fpm.wordpress.conf`
 +
 +I propose you create a file `/​etc/​opt/​remi/​php73/​php-fpm.d/​z_php-fpm.wordpress.conf`,​ you can put here all your settings
 +
 +<​file>​
 +[wordpress]
 +php_admin_value[max_input_vars] = YourValue
 +</​file>​
 +
 +then restart the service
 +
 +<​file>​
 +systemctl restart php73-php-fpm
 +</​file>​
 +
 +<WRAP center round important 60%>
 +Keep in mind to modify the path of the file if you change the version of php
 +`/​etc/​opt/​remi/​php73/​php-fpm.d/​z_php-fpm.wordpress.conf` to `/​etc/​opt/​remi/​php74/​php-fpm.d/​z_php-fpm.wordpress.conf`
 +</​WRAP>​
 +
 +
  
 ===== Use the php Cli===== ===== Use the php Cli=====