CLOUDLINUX SUPPORT:
Unfortunately, the alt-PHP doesn't have the cPanel PHP-FPM integration with the YAML file, as described here:
https://docs.cpanel.net/knowledge-base/php-fpm/configuration-values-of-php-fpm/
Thus we can't use templates like:
"[% homedir %]/logs/[% scrubbed_domain %].php.error.log"
in the alt-PHP configuration files or as a PHP directive due to the PHP configuration file limitations.
And since the PHP directives don't support custom variables - you can't set the variables like:
error_log = ~/error_log
error_log = /~/error_log
error_log = $HOME/error_log
error_log = /$HOME/error_log
This information can be obtained also from the php.ini configuration notes:
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise operators and parentheses:
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
Also, the PHP error_log directive doesn't support custom variables:
https://www.php.net/manual/en/function.error-log.php
Thus the only option that I can suggest - setting the custom error_log location per-user configuration:
https://docs.cloudlinux.com/cloudli...itional-php-ini-file-for-a-user-inside-cagefs
https://docs.cloudlinux.com/cloudli...al-customer-on-cpanel-server-with-easyapache4
Or you can allow users to manage the error_log value in the PHP Selector interface to determine the log location:
https://docs.cloudlinux.com/cloudlinux_os_components/#custom-php-ini-options