.user.ini

Post Reply
1webdomain
Posts: 7
Joined: Tue Sep 29, 2020 6:57 am

.user.ini do not run ?
User avatar
myVesta
Site Admin
Posts: 756
Joined: Fri Jun 19, 2020 9:59 am

I think not, since you can't redefine php ini variables from .htaccess, since PHP is not loaded as Apache module but as PHP-FPM service.
You can customize php ini variables (per domain) this way - viewtopic.php?f=18&t=54
Meister
Posts: 35
Joined: Mon Nov 08, 2021 10:04 am

Hello,

I had also always installed ninjafw (https://nintechnet.com/ninjafirewall/pro-edition/) via .user.ini.

What can I do to make it work?
I also had this error message: viewtopic.php?f=2&t=360&p=1101&hilit=open_basedir#p1101

So it will be related to open_basedir. What can I do?
User avatar
myVesta
Site Admin
Posts: 756
Joined: Fri Jun 19, 2020 9:59 am

Meister wrote: Sat Dec 18, 2021 11:19 pm Hello,

I had also always installed ninjafw (https://nintechnet.com/ninjafirewall/pro-edition/) via .user.ini.

What can I do to make it work?
I also had this error message: viewtopic.php?f=2&t=360&p=1101&hilit=open_basedir#p1101

So it will be related to open_basedir. What can I do?
yes, it's open_basedir in /etc/php/7.x/fpm/pool.d/yourdomain.conf
simply change open_basedir path to /home/user level (instead of /home/user/web/yourdomain/public_html) and restart php-fpm
Meister
Posts: 35
Joined: Mon Nov 08, 2021 10:04 am

in PHP 8.1 it worked. In PHP 5.6 I can do what I want because it does not work. Anyway the site will be updated to PHP 8.1 soon.

Thanks :)
Meister
Posts: 35
Joined: Mon Nov 08, 2021 10:04 am

i have now found a good solution :) .

i have changed the following in /etc/php/5.6/fpm/pool.d/yourdomain.conf.

php_admin_value[auto_prepend_file] = /home/user/web/domain.to/public_html/firewall.php
Post Reply