I need to add env[PATH] to php-fpm pool configuration for domains which are running Nextcloud.
I added additional directives to the php-settings
Now i need to add env[PATH] = $PATH to the pool configuration. This is not possible through the webinterface. It will give an syntax error.
I can modify the file /opt/plesk/php/7.4/etc/php-fpm.d/example.conf directly and can get rid of the warning"PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response. Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm." in Nextcloud. But as soon as i make a change in the web-interface this modification is wiped.
How can i add env[PATH] in a proper/persistent way?
Overwriting it in /var/www/vhosts/system/example.com/conf/php.ini does not work
I added additional directives to the php-settings
Code:
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
Now i need to add env[PATH] = $PATH to the pool configuration. This is not possible through the webinterface. It will give an syntax error.
I can modify the file /opt/plesk/php/7.4/etc/php-fpm.d/example.conf directly and can get rid of the warning"PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response. Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm." in Nextcloud. But as soon as i make a change in the web-interface this modification is wiped.
Code:
; ATTENTION!
;
; DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
; SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
; If you need to customize this file, use either custom PHP settings tab in
; Panel or override settings in /var/www/vhosts/system/example.com/conf/php.ini.
; To override pool configuration options, specify them in [php-fpm-pool-settings]
; section of /var/www/vhosts/system/example.com/conf/php.ini file.
[example.com]
; Don't override following options, they are relied upon by Plesk internally
prefix = /var/www/vhosts/system/$pool
user = user
group = psacln
listen = php-fpm.sock
listen.owner = root
listen.group = psaserv
listen.mode = 0660
; Following options can be overridden
chdir = /
; Uses for log facility
; If php_value[error_log] is not defined error output will be send for nginx
catch_workers_output = yes
; php.ini custom configuration directives
php_value[disable_functions] = ""
php_value[error_reporting] = 22519
php_value[max_execution_time] = 3600
php_value[max_input_time] = 3600
php_value[memory_limit] = 512M
php_value[opcache.enable_cli] = 1
php_value[opcache.interned_strings_buffer] = 8
php_value[opcache.max_accelerated_files] = 10000
php_value[opcache.memory_consumption] = 128
php_value[opcache.revalidate_freq] = 1
php_value[opcache.save_comments] = 1
php_value[open_basedir] = "/var/www/vhosts/something/:/tmp/:/dev/urandom:/proc/meminfo:/sys/class/net/venet0:/sys/class/net/lo"
php_value[post_max_size] = 10G
php_value[upload_max_filesize] = 10G
; Following directives define pool configuration
pm = ondemand
pm.max_children = 10
pm.max_spare_servers = 1
pm.min_spare_servers = 1
pm.process_idle_timeout = 10s
pm.start_servers = 1
env[PATH] = $PATH
How can i add env[PATH] in a proper/persistent way?
Overwriting it in /var/www/vhosts/system/example.com/conf/php.ini does not work
Last edited: