Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP FPM, EasyApache 4 and custom local php.ini

Discussion in 'EasyApache' started by martin MHC, Nov 23, 2018.

Tags:
  1. martin MHC

    martin MHC Well-Known Member

    Joined:
    Sep 14, 2016
    Messages:
    102
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    I have read this thread:

    PHP-FPM and PHP.INI

    With answers given by @cPanelMichael but these answers are all now HTTP 404s -- the documents have gone.

    I have found one document here:
    PHP-FPM and EasyApache 4 - Version 60 Documentation - cPanel Documentation

    But this is only for version 60 and unsure if /when this will also no longer be valid?

    The document is just throwing options at me without explanation as to how to use these options or exampling how to write a correctly formatted PHP FPM instruction.

    Further, I have TWO serious issues that

    1) With PHP-FPM turned on, my heavily customised (core) PHP.ini file set up in EasyApache4 is not being loaded.

    2) With PHP-FPM my account specific (local.ini) adjustments (session info. error logging etc.) is not being loaded.

    I need both of these things operational with PHP-FPM ... or what's the point of PHP-FPM if it only loads the default php.ini?!


    Therefore:

    Please can an updated answer be given as to how to complete the two requests stated above?

    Thanks.

    Martin
     
    #1 martin MHC, Nov 23, 2018
    Last edited: Nov 23, 2018
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    274
    Likes Received:
    20
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. martin MHC

    martin MHC Well-Known Member

    Joined:
    Sep 14, 2016
    Messages:
    102
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    @Eminds I have read and acted on both those threads and they have not helped me resolve this issue. There are no .yaml files present.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,411
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. martin MHC

    martin MHC Well-Known Member

    Joined:
    Sep 14, 2016
    Messages:
    102
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    @cPanelMichael Many thanks for this; I never realised that custom PHP.ini account-level directives can be placed using the EA PHP.ini Manager on the Cpanel account rather than on WHM centrally (or via ftp manual file uploads).

    BUT:

    The editor states:
    The MultiPHP INI editor writes to the .htaccess, .user.ini, and php.ini files. The system will only write a directive to a file if it is a valid directive for that file type. For more information, read our MultiPHP INI Editor documentation.

    I have looked at the documentation linked but it is ambiguous as to if it is HardCoded to edit .user.ini rather than editing the account-specific ini file specified in the core root php.ini .

    For example:

    my PHP.ini as set in WHM >> MultiPHP INI Editor :
    user_ini.filename = ".account.ini"


    So will the CPanel ini updates place changes in a .user.ini file or in an .account.ini file?

    Cheers
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,411
    Likes Received:
    1,956
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi @martin MHC,

    The procedure is different if you're using PHP-FPM. See this tutorial:

    Tutorial - Managing php.ini directives with PHP-FPM

    In general, you should never manually add or edit a .ini file within an account's home directory. Instead, you should use the MultiPHP INI Editor options in cPanel or Web Host Manager if you want to modify the PHP settings. Or, if you use PHP-FPM, see the tutorial linked above.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice