Page 1 of 1

.user.ini

Posted: Fri Apr 30, 2021 7:50 am
by 1webdomain
.user.ini do not run ?

Re: .user.ini

Posted: Fri Apr 30, 2021 2:27 pm
by myVesta
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

Re: .user.ini

Posted: Sat Dec 18, 2021 11:19 pm
by Meister
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?

Re: .user.ini

Posted: Sat Dec 18, 2021 11:43 pm
by myVesta
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

Re: .user.ini

Posted: Sun Dec 19, 2021 12:34 am
by Meister
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 :)

Re: .user.ini

Posted: Mon Dec 20, 2021 2:56 pm
by Meister
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