Changes

From SME Server
Jump to navigationJump to search
Line 1: Line 1:  +
=== Requirements ===
 +
{{Warning box|'''This page is ONLY for SME Server 9 64 bit''' which is now EOL and deprecated. Please upgrade '''urgently''' to SME Server v10}}
 +
{{Warning box|Even if you try this on an old v9 installation you may well break your server. Upgrade immediately}}
 +
{{Warning box|Do '''NOT''' try this on a v10 server}}
 +
 +
 
{{Languages}}
 
{{Languages}}
 
{{Level|Easy|The instructions for installing and using php scl can be followed by a beginner, changing options requires a basic knowledge of linux.}}
 
{{Level|Easy|The instructions for installing and using php scl can be followed by a beginner, changing options requires a basic knowledge of linux.}}
 
{{usefulnote}}
 
{{usefulnote}}
 +
 
== PHP Software Collections for SME Server ==
 
== PHP Software Collections for SME Server ==
 +
 +
{{warning box| Please check the following site for notes on EOL for different versions of PHP.
 +
 +
As of May 2019 the minimum supported version of PHP is 7.1 but only for security updates until 30th November 2019
 +
 +
https://www.php.net/supported-versions.php
 +
 +
Note that the default installed version of PHP on Koozali SME is 5.3.3 and that is supported for security updates by RedHat only until the distro goes EOL. However, it may not be supported by applications.}}
 +
 +
{{Warning box|'''With php-scl contrib older than  0.4-22 : If you enable PHP 7.x globally you may get errors trying to access Webmail and possibly some panels of the Server-Manager
 +
The highest PHP version that will work with Horde 3.x is PHP 5.6
 +
 +
To use PHP 7.x globally you will need to update to Horde 5.x (see Bugs/wiki)
 +
 +
If panels depending of php of your Server Manager or Webmail are blocked please see below for instructions on how to get them working
 +
'''
 +
 +
Simply updating to last version of php-scl contrib will solve this issue.}}
    
=== Maintainer ===
 
=== Maintainer ===
 
[mailto:stephdl@de-labrusse.fr stephdl] Stéphane de Labrusse AKA [[User:stephdl|Stephdl]]<br />
 
[mailto:stephdl@de-labrusse.fr stephdl] Stéphane de Labrusse AKA [[User:stephdl|Stephdl]]<br />
 
=== Version ===
 
=== Version ===
{{ #smeversion: smeserver-php-scl }}
+
{{#smeversion: smeserver-php-scl }}
    
=== Description ===
 
=== Description ===
Line 13: Line 38:     
All PHP rpms are installed in /opt , this prevents any interference or conflict with the default install of PHP.
 
All PHP rpms are installed in /opt , this prevents any interference or conflict with the default install of PHP.
  −
=== Requirements ===
  −
{{Warning box|'''Only for SME Server 9 64 bit'''}}
      
=== Installation ===
 
=== Installation ===
    
===Base installation===
 
===Base installation===
 +
 +
==== Simple repo installation====
 +
 +
These repos can now be easily added using a rpm
 +
 +
yum --enablerepo=smeaddons install smeserver-extrarepositories-epel, smeserver-extrarepositories-remi-safe
 +
 +
==== Manual repo installation====
    
Remember to first configure the required [[remi-safe]] repository,  
 
Remember to first configure the required [[remi-safe]] repository,  
 
{{:Remi-safe}}
 
{{:Remi-safe}}
   −
you might also need [[epel]] repository,
+
In the future you may also need [[epel]] repository, although currently it is not required
    
{{:Epel|transcludesection=Generic}}
 
{{:Epel|transcludesection=Generic}}
 +
    
then you need to issue this command before installing:
 
then you need to issue this command before installing:
Line 130: Line 161:  
     PostMaxSize=20M
 
     PostMaxSize=20M
 
     UploadMaxFilesize=10M
 
     UploadMaxFilesize=10M
 +
 +
{{Note box|Similar settings for php72 and php73 should be available in the latest release}}
    
in fact you can choose manually (think about you have a panel for that) which version you want to use in the phpmod of apache (only one version can be used), for example
 
in fact you can choose manually (think about you have a panel for that) which version you want to use in the phpmod of apache (only one version can be used), for example
Line 163: Line 196:     
#If smecontribs is not enabled, you will need to issuethe following:
 
#If smecontribs is not enabled, you will need to issuethe following:
  yum update smeserver-php-scl php54* php55* php56* php70* php71*--enablerepo=smecontribs
+
  yum update smeserver-php-scl php54* php55* php56* php70* php71* --enablerepo=smecontribs
    
====Advanced install====
 
====Advanced install====
Line 176: Line 209:  
  yum remove smeserver-php-scl
 
  yum remove smeserver-php-scl
    +
=== Custom Templates ===
 +
If you need to modify the php.ini you can add a custom template.
 +
 +
Make a new directory here and add your template fragment:
 +
 +
<syntaxhighlight  lang="bash" >
 +
/etc/e-smith/templates-custom/opt/remi/php{$ver}/root/etc/php.ini
 +
</syntaxhighlight>
    
===Debug===
 
===Debug===
 +
 +
{{Warning box| This was for v9. v10 is different and this may break your installation
 +
Some notes here:
 +
https://wiki.koozali.org/Koozali_SME_Server_Debugging#Multiple_machine_debug_proxy}}
    
====Setup====
 
====Setup====
Line 201: Line 246:  
====Standard direct connection====
 
====Standard direct connection====
   −
[Debugger]
+
For stock xdebug you probably need to set debugger.enabled to True
;debugger.host                          = localhost
+
 
;debugger.port                          = 7869
+
Copy:
;debugger.enabled                      = False
+
/etc/e-smith/templates/opt/remi/phpxx/root/etc/php.ini/80ModuleSettings03Debugger
 +
 
 +
To:
 +
/etc/e-smith/templates-custom/opt/remi/phpxx/root/etc/php.ini/80ModuleSettings03Debugger
 +
 
 +
Edit the following and set debugger.enabled to True
 +
 
 +
[Debugger]
 +
debugger.host                          = localhost
 +
debugger.port                          = 7869
 +
debugger.enabled                      = False
 +
 
 +
You could add a debug setting to automate this.
 +
 
 +
;debugger.enabled                      = False
 +
debugger.enabled                      = {
 +
    my $debug = $php71{Debugger} || "False";
 +
    $OUT .= "$debug";
 +
}
   −
zend_extension                          = "/usr/lib64/php/modules/xdebug.so"
+
Now you can do:
zend_debugger.allow_hosts              = 192.168.10.0/24
+
 
zend_debugger.expose_remotely          = always
+
config setprop php71 Debugger True
zend_debugger.httpd_uid                = 102
+
signal-event php-update
zend_debugger.httpd_uid                = -1
+
 
 +
Using Komodo IDE with pydbgp you may need a debug section like this
 +
 
 +
;xdebug.remote_enable                  = true
 +
xdebug.remote_enable                  = {
 +
    my $debug = $php71{Debugger} || "False";
 +
    $OUT .= "$debug";
 +
}
 +
; If using a debug proxy on the server for multi users you need settings like this
 +
; If you have a single user you can set remote host to their IP
 +
xdebug.remote_host                    = 127.0.0.1
 +
xdebug.remote_port                    = 9000
 +
xdebug.remote_handler                  = dbgp
 +
xdebug.remote_log                      = /var/log/xdebug.log
 +
xdebug.remote_mode                    = req
 +
 
 +
 
 +
Alternative if you use Zend/Eclipse etc:
 +
 
 +
zend_extension                          = "/usr/lib64/php/modules/xdebug.so"
 +
zend_debugger.allow_hosts              = 192.168.10.0/24
 +
zend_debugger.expose_remotely          = always
 +
zend_debugger.httpd_uid                = 102
 +
zend_debugger.httpd_uid                = -1
    
  signal-event php-update
 
  signal-event php-update
Line 238: Line 324:     
  https://test.myserver.com/TestFile.php?XDEBUG_SESSION_START=users
 
  https://test.myserver.com/TestFile.php?XDEBUG_SESSION_START=users
 +
 +
===Cannot access Webmail ===
 +
 +
In previous version you could have issue accessing webmail if php7 is selected. We have added a process to set php cgi to php56 in case a php7 version is selected globally. Unfortunately this would create a lot of warnings in the logs.
 +
 +
you could avoid this by doing:
 +
<syntaxhighlight lang="bash">
 +
mkdir -p /etc/e-smith/templates-custom/home/httpd/html/horde/config/conf.php/
 +
cp -a /etc/e-smith/templates/home/httpd/html/horde/config/conf.php/100GeneralSettings /etc/e-smith/templates-custom/home/httpd/html/horde/config/conf.php/
 +
 +
#then add this in the file
 +
if (defined('E_STRICT')) \{
 +
  $conf['debug_level'] &=  ~E_STRICT;
 +
\}
 +
 +
</syntaxhighlight>
 +
and finally, run :
 +
<syntaxhighlight  lang="bash" >
 +
expand-template /home/httpd/html/horde/lib/core.php
 +
</syntaxhighlight>
 +
 +
this will reduce the amount of warning, but there will be still some because of script called before the conf file
 +
 +
in older version if you find that you can not access Webmail then you can disable PHP SCL as follows:
 +
 +
Global
 +
 +
config setprop php{$ver} PhpModule disabled|enabled
 +
signal-event php-update
 +
 +
eg
 +
 +
config setprop php71 PhPModule disabled
 +
signal-event php-update
 +
 +
You should now be able to access Webmail
 +
 +
As a side note this is how to do it per ibay
 +
For an individual ibay
 +
 +
db {ibayname} setprop php{$ver} PhpVersion disabled|enabled
 +
signal-event php-update
    
=== Bugs ===
 
=== Bugs ===
Line 247: Line 375:  
Only released version in smecontrib are listed here.
 
Only released version in smecontrib are listed here.
   −
{{ #smechangelog: smeserver-php-scl}}
+
{{#smechangelog: smeserver-php-scl}}
 
     −
[[Category: Contrib]]
+
[[Category: Deprecated_Contrib]]
 
[[Category:Software Collections]]
 
[[Category:Software Collections]]

Navigation menu