Enable disabled php function

Post Reply
ebk
Posts: 4
Joined: Fri May 07, 2021 4:56 pm

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
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

did you restart php-fpm service after editing php.ini?
what is a path of php.ini file that you edited?
ebk
Posts: 4
Joined: Fri May 07, 2021 4:56 pm

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
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

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
ebk
Posts: 4
Joined: Fri May 07, 2021 4:56 pm

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
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

if you got 'no value' then you successfully changed php.ini value
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

max upload values are defined in /pool.d/ conf files.
read viewtopic.php?f=18&t=54
ebk
Posts: 4
Joined: Fri May 07, 2021 4:56 pm

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.
Post Reply