Changes

Jump to navigation Jump to search
477 bytes added ,  02:49, 15 November 2023
Line 25: Line 25:  
|php55
 
|php55
 
|customization of /opt/remi/php55/root/etc/php.ini
 
|customization of /opt/remi/php55/root/etc/php.ini
| rowspan="8" |if no properties defined, will use php keys properties
+
| rowspan="11" |if no properties defined, will use php keys properties
 
|-
 
|-
 
|php56
 
|php56
Line 47: Line 47:  
|php80
 
|php80
 
|customization of /etc/opt/remi/php80/php.ini
 
|customization of /etc/opt/remi/php80/php.ini
 +
|-
 +
|php81
 +
|customization of /etc/opt/remi/php81/php.ini
 +
|-
 +
|php82
 +
|customization of /etc/opt/remi/php82/php.ini
 +
|-
 +
|php83
 +
|customization of /etc/opt/remi/php83/php.ini
 
|}
 
|}
 
Every version of php has its own php-fpm service running, the related configuration db entry is (as shown in the Table above) php-fpm for php (ie php54), php55-php-fpm for php55 and so on.
 
Every version of php has its own php-fpm service running, the related configuration db entry is (as shown in the Table above) php-fpm for php (ie php54), php55-php-fpm for php55 and so on.
Line 239: Line 248:  
After that issue the following commands:
 
After that issue the following commands:
   −
  signal-event webapps-updates
+
  signal-event webapps-update
      Line 270: Line 279:  
<!--Please do not remove the following closing tag as a fromatting/rendering bug will kick in, for more details see: http://bugzilla.wikimedia.org/show_bug.cgi?id=10893--><li>Open a SME Server shell as root user and document the current setting of the PHPBaseDir directive by writing down the output of the following command:
 
<!--Please do not remove the following closing tag as a fromatting/rendering bug will kick in, for more details see: http://bugzilla.wikimedia.org/show_bug.cgi?id=10893--><li>Open a SME Server shell as root user and document the current setting of the PHPBaseDir directive by writing down the output of the following command:
 
  db accounts getprop ibayname PHPBaseDir  
 
  db accounts getprop ibayname PHPBaseDir  
Be careful to write it down to the letter as we need it in the next step
+
Be careful to write it down to the letter as we need it in the next step.
 
For the Primary ibay the ouptut of above command would normally look like this:
 
For the Primary ibay the ouptut of above command would normally look like this:
 
  /home/e-smith/files/ibays/Primary/html/
 
  /home/e-smith/files/ibays/Primary/html/
Line 278: Line 287:  
  db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/
 
  db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/
 
Above command would allow for invocation of scripts in the /opt/gallery2 path from the Primary ibay html folder by PHP.
 
Above command would allow for invocation of scripts in the /opt/gallery2 path from the Primary ibay html folder by PHP.
To allow uploading of files to via http to a ibay name wiki
+
To allow uploading of files to via http to a ibay name wiki:
 
  db accounts setprop wiki PHPBaseDir /home/e-smith/files/ibays/wiki/:/tmp/
 
  db accounts setprop wiki PHPBaseDir /home/e-smith/files/ibays/wiki/:/tmp/
   Line 289: Line 298:  
upload_tmp_dir
 
upload_tmp_dir
   −
From SME Server V8 up to and including SME Server V9, you could sometimes have an error thrown by PHP and would then need to specify a temporary directory (e.g. upload_tmp_dir) which is not set in php.ini. see [[bugzilla:6650]] and [[bugzilla:7652]]. Many php applications need this setting, the best-known culprits are Wordpress, Roundcube, eGroupWare, and there are others. ther symptoms observed are that you can't upload contents to the PHP application.
+
From SME Server V8 up to and including SME Server V9, you could sometimes have an error thrown by PHP and would then need to specify a temporary directory (e.g. upload_tmp_dir) which is not set in php.ini. see [[bugzilla:6650]] and [[bugzilla:7652]]. Many php applications need this setting, the best-known culprits are Wordpress, Roundcube, eGroupWare, and there are others. The symptoms observed are that you can't upload contents to the PHP application.
   −
An easy resolution is to make a Custom Template to resolve this issue. see [[Uploadtmpdir]]
+
An easy resolution is to make a Custom Template to resolve this issue. See [[Uploadtmpdir]].
    
=== Advanced use of the php-fpm pools ===
 
=== Advanced use of the php-fpm pools ===
   −
==== For the ibays with with php-fpm.d/ibays.conf ====
+
==== For the ibays with php-fpm.d/ibays.conf ====
for the ibays better option is to simply use the contrib [[Webhosting]]
+
For the ibays better option is to simply use the contrib [[Webhosting]].
    
==== For the contrib sharefolders with php-fpm.d/shares.conf ====
 
==== For the contrib sharefolders with php-fpm.d/shares.conf ====
similar to ibays
+
Similar to ibays.
    
==== For the contribs with php-fpm.d/www.conf ====
 
==== For the contribs with php-fpm.d/www.conf ====
please read [[Building Your Contrib]]
+
Please read [[Building Your Contrib]].
    
==== For your custom needs with php-fpm.d/custom.conf ====
 
==== For your custom needs with php-fpm.d/custom.conf ====
you can build your own pool to use in any place on your server, even in a subfolder of an ibay or in place of the regular ibay php-pool (property PHPCustomPool)
+
You can build your own pool to use in any place on your server, even in a subfolder of an ibay or in place of the regular ibay php-pool (property PHPCustomPool).
   −
There are two ways in doing that  
+
There are two ways in doing that:
    
===== using db php =====
 
===== using db php =====
using the default template : /etc/e-smith/templates/etc/php-fpm.d/custom.conf , you can set your own pool doing:
+
Using the default template : /etc/e-smith/templates/etc/php-fpm.d/custom.conf , you can set your own pool doing:
 
  db php set MYPOOLNAME pool Version 81 status enabled
 
  db php set MYPOOLNAME pool Version 81 status enabled
 
here are the accepted supplementary properties, as always missing or empty means using default.
 
here are the accepted supplementary properties, as always missing or empty means using default.
Line 398: Line 407:  
|
 
|
 
|}
 
|}
you will then need two httpd.conf custom template fragment to use your pool. You will need to change  '''MYPOOL''' to what you want
+
You will then need two httpd.conf custom template fragment to use your pool. You will need to change  '''MYPOOL''' to what you want
 
  mkdir -p  /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 
  mkdir -p  /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 
  vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98mypoolusage
 
  vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98mypoolusage
Line 416: Line 425:  
     allow from all
 
     allow from all
 
  </Directory>
 
  </Directory>
then just do signal-event webapps-update
+
Then just do:
 +
signal-event webapps-update
    
===== using a templates-custom =====
 
===== using a templates-custom =====
Line 460: Line 470:  
</syntaxhighlight>This will prevent the generation of the default ibay pool in  ibays.conf , and let you use /var/run/php-fpm/php$version-$name.sock socket from your template-custom... or from the db php using the same key as the name of the ibay.
 
</syntaxhighlight>This will prevent the generation of the default ibay pool in  ibays.conf , and let you use /var/run/php-fpm/php$version-$name.sock socket from your template-custom... or from the db php using the same key as the name of the ibay.
   −
===Installation of composer===
+
===Installation of Composer===
    
This is made tricky as we do not have the PHP CLI configured.
 
This is made tricky as we do not have the PHP CLI configured.
   −
But we can install it as follows with command line arguments. This is using php74
+
But we can install it as follows with command line arguments. This is using php74.
    
Download:
 
Download:
 
  php74 -d allow_url_fopen=on -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
 
  php74 -d allow_url_fopen=on -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
 +
 +
Hash check:
 +
php74 -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    
Install:
 
Install:
  php74 -d allow_url_fopen=on  ./composer-setup.php  
+
  php74 -d allow_url_fopen=on  ./composer-setup.php
    
=== Bugs ===
 
=== Bugs ===
Line 480: Line 493:     
[[Category: Howto]]
 
[[Category: Howto]]
 +
[[Category: Webapps]]
board, director
297

edits

Navigation menu