Koozali.org formerly Contribs.org

PHP-SCL Versions and upload limits

PHP-SCL Versions and upload limits
« on: May 03, 2019, 09:52:18 AM »
I am using contrib PHP-SCL Versions since default PHP is 5.3.3 and Wordpress requires 5.6.2
I have pointed contrib to my iBay and everything works fine, except for upload limits.

I was issuing following command to increase PHP limits:

Code: [Select]
  db configuration setprop php MemoryLimit 128M
  db configuration setprop php PostMaxSize 112M
  db configuration setprop php UploadMaxFilesize 96M
  expand-template /etc/php.ini
  sv t httpd-e-smith

Afterwards I have realized that above command works on default PHP install, not on contribs.

Does anybody know how I can increase memory limits for the contrib?
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline mmccarn

  • *
  • 2,445
Re: PHP-SCL Versions and upload limits
« Reply #1 on: May 03, 2019, 01:32:01 PM »
The php-scl versions use different db settings - https://wiki.contribs.org/PHP_Software_Collections#Usage

From that wiki page, for php56 you would need to use:
Code: [Select]
db configuration setprop php56 MemoryLimit 128M
db configuration setprop php56 PostMaxSize 112M
db configuration setprop php56 UploadMaxFilesize 96M
signal-event php-update

Re: PHP-SCL Versions and upload limits
« Reply #2 on: May 10, 2019, 12:18:37 AM »
Thank you mmccarn, it worked perfectly.
I have updated my Wordpress How-To, to help other users.
« Last Edit: May 10, 2019, 12:34:17 AM by calisun »
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline mmccarn

  • *
  • 2,445
Re: PHP-SCL Versions and upload limits
« Reply #3 on: May 10, 2019, 04:44:30 AM »
I have created a feature request against the php-scl contrib to default to the primary 'php' configuration values if there are no specific values indicated for a given php version: Bug 10774 - NFR -Use 'php' config values when there are no specific php-scl settings configured

Offline ReetP

  • *
  • 2,143
Re: PHP-SCL Versions and upload limits
« Reply #4 on: May 10, 2019, 10:48:09 AM »
Please note PHP 5.6 and 7.0 are EOL and should not be used.

The minimum SCL version is 7.1 and that is in security maintenance mode now.

I have added that to the wiki

https://wiki.contribs.org/PHP_Software_Collections
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: PHP-SCL Versions and upload limits
« Reply #5 on: June 01, 2019, 04:06:13 AM »
Another related question,
how about other PHP specific code that is found in step A2 in: https://wiki.contribs.org/Wordpress_Multisite
Will that also work on PHP-SCL or some other code needs to be issued for PHP-SCL to function properly?
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite

Offline mmccarn

  • *
  • 2,445
Re: PHP-SCL Versions and upload limits
« Reply #6 on: June 01, 2019, 12:58:54 PM »
Another related question,
how about other PHP specific code that is found in step A2 in: https://wiki.contribs.org/Wordpress_Multisite
Will that also work on PHP-SCL or some other code needs to be issued for PHP-SCL to function properly?

The db variable from step A2 (PHPBaseDir) only appears in one  template:
Quote from: etc/httpd/conf/httpd.conf/95AddType00PHP2ibays
{
    my $status = $php{status} || 'disabled';
    if ($status eq 'enabled')
    {
   use esmith::AccountsDB;
   my $adb = esmith::AccountsDB->open_ro();
   foreach my $ibay ($adb->ibays)
   {
       local $dynamicContent = $ibay->prop('CgiBin') || 'disabled';
       if ($dynamicContent eq 'enabled')
       {
      $OUT .= "\n<Directory /home/e-smith/files/ibays/" . $ibay->key . "/html>\n";
      $OUT .= "    AddType application/x-httpd-php .php .php3 .phtml\n";
      $OUT .= "    AddType application/x-httpd-php-source .phps\n";

      # Set the sandbox within which PHP is confined to play
      my $basedir = $ibay->prop('PHPBaseDir')
          || ("/home/e-smith/files/ibays/" . $ibay->key . "/");
      $OUT .= "    php_admin_value open_basedir $basedir\n";
      $OUT .= "</Directory>\n";
       }
   }
    }
}

The template only affects /etc/httpd/conf/httpd.conf.

My conclusion is that the setting for PHPBaseDir is unaffected by the php/phpscl version, and the existing instructions should work as expected.

Offline ReetP

  • *
  • 2,143
Re: PHP-SCL Versions and upload limits
« Reply #7 on: June 01, 2019, 01:34:58 PM »
Note that PHP 5.6 is EoL with security updates ceasing 31st December 2018

PHP 7.0 is EoL too.

PHP 7.1 is EoL Dec 2019

PHP 7.2 is EoL Nov 2020

We should not be encouraging use of anything below 7.1 and prefererably 7.2

I'll try and take a look at Mikes NFR, but we should be looking at implementing it for newer versions of PHP.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Re: PHP-SCL Versions and upload limits
« Reply #8 on: June 03, 2019, 04:30:19 AM »
We should not be encouraging use of anything below 7.1 and prefererably 7.2

Updated instructions for Wordpress_Multisite in step A7 and and Part2 step 3 to reflect this
SME user and community member since 2005.
Want to install Wordpress in iBay of SME Server?
See my step-by-step How-To wiki here:
http://wiki.contribs.org/Wordpress_Multisite