Page 1 of 1

Enable disabled php function

Posted: Mon May 10, 2021 1:01 am
by ebk
I know that MyVesta disabled dangerous PHP functions, but for installing a CMS I need to enable exec and other requirements listed below. I've tried to edit php.ini, but I do not succeed. Someone could tell me how I can solve my problems? Thank you so much!

Server OS is Debian 10

PHP settings (php.ini) :
functions: exec() , allow url_fopen

Re: Enable disabled php function

Posted: Mon May 10, 2021 7:26 am
by myVesta
did you restart php-fpm service after editing php.ini?
what is a path of php.ini file that you edited?

Re: Enable disabled php function

Posted: Mon May 10, 2021 6:24 pm
by ebk
Thank you for your fast response.

I've edited /etc/php/7.3/fpm/php.ini by adding a line: disable_functions = ""

After that I restarted Apache e Ngix from MyVesta Panel.

I admit that I am not very competent in this field, so perhaps I am mistaking simple things

Re: Enable disabled php function

Posted: Mon May 10, 2021 10:22 pm
by myVesta
do:

Code: Select all

service php7.3-fpm restart
Also be sure that you removed "disable_functions" line that already exists somewhere in /etc/php/7.3/fpm/php.ini

Re: Enable disabled php function

Posted: Tue May 11, 2021 9:38 am
by ebk
Both ngix and apache php.ini files (as I check on MyVesta Panel) have only one line:
USAGE: config

I've tried to add and edit "Max upload" and other simple fields, save it and restart FPM like you teach me.
I've check my phpinfo and seems nothing changed.

Do I failed something installing MyVesta?

Thank you so much for help me.

EDIT: even if It seems failed to change value, now I get "disable_functions no value" pn phpinfo page

Re: Enable disabled php function

Posted: Tue May 11, 2021 10:05 am
by myVesta
if you got 'no value' then you successfully changed php.ini value

Re: Enable disabled php function

Posted: Tue May 11, 2021 10:07 am
by myVesta
max upload values are defined in /pool.d/ conf files.
read viewtopic.php?f=18&t=54

Re: Enable disabled php function

Posted: Fri May 21, 2021 4:32 pm
by ebk
Thank you so much for your support :D . I solved all my problems with the restart code:

Code: Select all

service php7.3-fpm restart

And with the post you wrote and linked to me I was able to edit the php.ini correctly.