Koozali.org: home of the SME Server

How do I change per ibay PHP settings under SME10?

Offline wdepot

  • ***
  • 89
  • +0/-0
    • http://westerndepot.com
How do I change per ibay PHP settings under SME10?
« on: August 06, 2021, 02:16:42 AM »
I am trying to change some of the SME10 PHP default settings using config setprop and after finding out where the files are that control PHP settings and how the setting override works I've looked that the templates for the files so I know what the names of the configuration properties are that I need to set and I know that the master settings go in the config key php74-php-fpm (for PHP version 7.4 at least) but I'm not sure where the settings for a specific ibay go. For example I'm trying to change the post_max_size for the primary ibay to 200M. By setting the property PostMaxSize in php74-php-fpm to 200M I was successfully able to get the master setting in php-fpm.d/www.conf to change to 200M but it stubbornly remains at 20M in ibays.conf which takes precedence. So how so I setprop the ibays settings to get what I want?


Offline wdepot

  • ***
  • 89
  • +0/-0
    • http://westerndepot.com
Re: How do I change per ibay PHP settings under SME10?
« Reply #2 on: August 07, 2021, 02:11:48 AM »
https://forums.contribs.org/index.php/topic,54550.msg285873.html#msg285873

I know about the WebHosting contribution but the problem is that it doesn't allow you to modify settings for the Primary ibay which is where the site I use is located. That is why I asked about changing the values in db configuration. Looking at the 10Ibays file and the usage shown by config I'm guessing I would need to do something like
Code: [Select]
config set Primary ibay PostMaxSize 200Msince looking at the output from config keys I don't see any named primary (or any other ibay name) and as near as I can tell that is where the code in 10Ibays looks for specific information bay settings. I was just hoping that someone here could confirm my suspicions about this.

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: How do I change per ibay PHP settings under SME10?
« Reply #3 on: August 07, 2021, 03:39:06 AM »
# db accounts show Primary

may help
--
qui scribit bis legit

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: How do I change per ibay PHP settings under SME10?
« Reply #4 on: August 07, 2021, 11:21:16 PM »
Code: [Select]
db accounts setprop Primary Modifiable yes

and play with webhosting

Offline wdepot

  • ***
  • 89
  • +0/-0
    • http://westerndepot.com
Re: How do I change per ibay PHP settings under SME10?
« Reply #5 on: August 11, 2021, 02:19:20 AM »
Code: [Select]
db accounts setprop Primary Modifiable yes

and play with webhosting

Actually you just provided the key to changing any of the per ibay settings found in 10Ibays. All I need to do is
Code: [Select]
db accounts setprop ibayname SettingName valueas an example
Code: [Select]
db accounts setprop Primary AllowUrlFopen enabled MemoryLimit 300M PostMaxSize 200M
The WebHosting contribution isn't needed in that case although it does simplify things by activating the settings as soon as you save which you have to do manually if setting them with the db command as shown here.

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: How do I change per ibay PHP settings under SME10?
« Reply #6 on: August 11, 2021, 02:05:07 PM »
webhosting contrib will prevent you to shoot yourself in the foot unless you fully understand the principle of template metadata and know exactly what service and what template you need to expand.  There are >6 php versions available on SME.

That without mentioning using the expected syntax for a property value 

I worked myself on the elaboration of the php template and service, and I am always  using webhosting contrib to set php settings for an ibay.