Skip to main content

Cpanel PHP-FPM error_log location

Comments

5 comments

  • cPRex Jurassic Moderator

    Hey there! Could you try the workaround mentioned here and see if that gets you what you need?

    https://support.cpanel.net/hc/en-us/community/posts/19121164499863

    0
  • peterbra
    OK, I've changed /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml so it looks: --- php_admin_flag_allow_url_fopen: 'on' php_admin_flag_log_errors: 'on' php_admin_value_disable_functions: exec,passthru,shell_exec,system php_admin_value_doc_root: "\"[% documentroot %]/\"" php_admin_value_error_log: "[% documentroot %]/error.log" php_admin_value_short_open_tag: 'on' php_value_error_reporting: E_ALL & ~E_NOTICE pm_max_children: 500 pm_max_requests: 2000 pm_process_idle_timeout: 150 I've restarted both Apache and PHP-FPM service for Apache and nothing changed ?
    0
  • peterbra
    Any help ?
    0
  • cPanelLauren
    As far as I understand it what you have isn't formatted correctly. This doesn't appear at all as it's noted in the documentation. This should be: php_admin_value_error_log: { name: 'php_value[error_log]', value: "[% homedir %]/logs/[% domain_tld %].php.error.log]" }
    you can omit logs/ if you just want the data to go into the homedirectory of the user or if you do really want the logs to go into the document root it would be: php_admin_value_error_log: {name: 'php_value[error_log]', value: "[% documentroot %].php.error.log]"}
    and any double quotes must be escaped as noted in the "important" section at the top: [QUOTE] Important: To avoid directive configuration errors, you must follow these syntax rules:
    • You must use single quotation marks ' ' at the beginning and end of strings with double quotation marks " ". The YAML parser automatically removes quotation marks from string values. This means that values that require double quotation marks must use single quotation marks before and after the double quotation marks to retain their value.
    • You must use an escape character \ with any double quotation marks " " that you use inside of the string.

    You can also use the config script to check your work and rebuild the configuration The php_fpm_config Script | cPanel & WHM Documentation This gives you the step by step workflow How to Manage Your php.ini Directives with PHP FPM | cPanel & WHM Documentation
    0
  • HappyFeat

    There needs to be a big red warning in cPanel saying "Please NOTE: PHP-FPM is going to screw up all of your error reporting"

    0

Please sign in to leave a comment.