Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2015
    Posts
    7
    Points
    684
    Level
    9

    Setting php_admin_value or php_admin_flag for php-fpm instances

    Hello,

    I'm wondering if it's possible to set the php_admin_value or php_admin_flag for php-fpm instances setup by InterWorx. I know you can put php_admin_value[memory_limit] = 512M in the php-fpm process config, but this is overwritten when InterWorx writes the config files again. I also know you can use ~iworx/bin/config.pex to configure specific php-fpm instances (as ~iworx/bin/config.pex --siteworx example.com --set --name FPM_MAX_CHILDREN --value 8), but I don't see an option to set php_admin_* values.

    Any ideas?

    Thanks

  2. #2
    Join Date
    Apr 2012
    Posts
    2,101
    Points
    20,806
    Level
    62
    Hi xmmedia

    Have you just tried setting the value

    Does it fail

    Many thanks

    John

  3. #3
    Join Date
    Jul 2015
    Posts
    7
    Points
    684
    Level
    9
    Yes: adding a value to the specific php-fpm process config works (ie, php shows the new value) but as soon as InterWorx rewrites the config files, the added value is removed.

  4. #4
    Join Date
    Apr 2012
    Posts
    2,101
    Points
    20,806
    Level
    62
    Hi xmmedia

    I'm sorry I'll have to have a think but one thing comes to mind, re php.ini settings, you could try create a /etc/php-fpm.ini in the siteworx root folder (not hosting folder /HTML) and see if that works. I believe it worked for php.ini user settings or the other thought is to add php-fpm to your .htaccess file

    Many thanks

    John

  5. #5
    Join Date
    Jul 2015
    Posts
    7
    Points
    684
    Level
    9
    No problem. This lead me down another path.

    Instead of having a separate file or modifying the interworx generated config file, I tried putting the config option directly in the main php-fpm config (www.conf) as:

    Code:
    [example.com]
    php_admin_value[memory_limit] = 256M
    Not completely ideal. The main issue being that if the siteworx is deleted, PHP will fail to start (confirmed). But it does work.

    Also, of note: it doesn't seem like the ~/etc/php.ini (or ~/etc/php-fpm.d/example.com.conf or anything else I tried) file is loaded by php-fpm. And putting values in the .htaccess doesn't work either (causes Internal Server error because php is already running).

    So, thanks for pointing me in the right direction. If you have any other better ideas, I'd love to hear them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •