Moodle Warning: is_readable(): open_basedir

Hi,

after launching moodle from zip I have the following problem:

Warning: is_readable(): open_basedir restriction in effect. File(/db/renamedclasses.php) is not in allowed paths: (/home/xxx/.composer:/home/xxx/web/platform.xxx.com/public_html/:/home/xxx/web/platform.xxx.com/private:/home/xxx/web/platform. xxx.com/public_shtml:/home/xxx/tmp:/tmp:/var/www/html:/bin:/sr/bin:/usr/local/bin:/usr/share:/opt) in /home/xxx/web/platforma.xxx.com/public_html/moodle/lib/classes/component.php on line 1210

I read through the form and found the following thread:

I created
in the directory /usr/local/hestia/data/templates/web/php-fpm/PHP-moodle-8_0.tpl
with the following content:
; origin-src: deb/php-fpm/multiphp.tpl

[%domain%]
listen = /run/php/php%backend_version%-fpm-%domain%.sock
listen.owner = %user%
listen.group = www-data
listen.mode = 0660

user = %user%
group = %user%

pm = ondemand
pm.max_children = 8
pm.max_requests = 4000
pm.process_idle_timeout = 10s
pm.status_path = /status

php_admin_value[upload_tmp_dir] = /home/%user%/tmp
php_admin_value[session.save_path] = /home/%user%/tmp
;php_admin_value[open_basedir] = /home/%user%/. composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt
php_admin_value[open_basedir] = “/”
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f admin@%domain%

env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /home/%user%/tmp
env[TMPDIR] = /home/%user%/tmp
env[TEMP] = /home/%user%/tmp

what further can I improve?

Translated with DeepL

Make sure to create a template called:

yourname-PHP-8_0.tpl and not
PHP-yourname-8_0.tpl

Yes you are right.
I had to refresh the panel in the browser to see the new tpl.
Moodle works

Hi, @eris

I have another problem creating 2 template for php 8.0 kills me php8.1 with error:

[09-Aug-2023 10:43:39] ERROR: Another FPM instance seems to already listen on /run/php/php8.1-fpm-platform.openmind4zero.com-platform2.sock
[09-Aug-2023 10:43:39] ERROR: FPM initialization failed

I found that there can’t be 2 pages with changed tpl. So I kicked the template out of the 2nd page.

I removed the socket but it did not solve the problem all the time php 8.1 is with the above error.