Can't enable "exec" functions

BlazJ

New member
Joined
May 23, 2018
Messages
3
Hi.
For past week I have been in contact with several people from diferent supports and it seem noone can or is willing to fix a problem so I decided to do it on my own but there is a problem I can't find any files where I can remove "exec" from disabled functions wich is main reason my plug in won't work properly.

So far I learned I have shared webhos, aperently I have all admin rights in DirectAdmin program and it seem php.ini file doesn't exsist since I have been looking everywhere but can't find it. (even tried advance search but it just send me back to main site with files)

Is there any other sollutions for guy like me who don't know anything about it to fix it?
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
72
By default Directadmin parses additional .ini files in the <yourphplocation>/php.conf.d folder. Do you have ssh access on the server? If so, search for a file named '50-webapps.ini' in this folder, it will probably in there.

If you're using php-fpm and you want to enable exec for a specific user, you can edit this file (your php version may differ):

/usr/local/directadmin/data/users/<username>/php/php-fpm71.conf

and add the following line:

php_admin_value[disable_functions] = system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname

and restart the php-fpm service
 

BlazJ

New member
Joined
May 23, 2018
Messages
3
I checked everything but couldn't find anything with that name.
As for ssh acess im not sure if I have it since others made this website for me and just aemd me details to log in DirectAdmin when asked to fix it.
If it helps it was made in wordpress.
 

BlazJ

New member
Joined
May 23, 2018
Messages
3
I checked everything but couldn't find anything with that name.
As for ssh acess im not sure if I have it since others made this website for me and just aemd me details to log in DirectAdmin when asked to fix it.
If it helps it was made in wordpress.
Edit:
I found that file is located in " /usr/local/php56/lib " but I can't find any folders/files with that name.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,314
Location
Maastricht
So far I learned I have shared webhos, aperently I have all admin rights in DirectAdmin program
Looks to me this is a contradiction unless the shared hosting server is yours. And in that case you should have SSH access.

If it's a real shared hosting server, you shouldn't have access to /usr/local/lib/php.ini or kindlike files (like /usr/local/php56/lib/php.ini which is probably the reason why you can't find those.

Looks like the best opinion is to ask your webhoster if you are indeed on a shared hosting server, because in that case you won't be able to enable it yourself.
Next to that, most webhosters disable this for security reasons so the chance is not very big that they will enable it for you.

So in short:
a.) You are on a shared webhosting server -> ask your hosting provider, if he does not want to enable it, you can't enable it by yourself.
b1.) If you have a VPS and really -full- Directadmin access rights, you should also have root access to the server via SSH and you can enable it.
b2.) Same as b1 but in a managed situation, you have to ask the hoster which does the managing to enable it.
 

AndrewN

Verified User
Joined
May 26, 2018
Messages
22
can't enable exec function

If you are hosted your site under shared server, you cant enable php functions as per your need, you must ask your hosting providers to enable it in server itself so that you can use those functions
If you are using VPS then you can be able to enable it by yourself using direct admin panel,
 

F44DU

New member
Joined
Dec 11, 2019
Messages
1
I installed directadmin on VPS and i was unable to enable the following extensions: exec, proc_open, popen
I tried searching for that which @wtptrs mentioned above but i was unable to do so at all. I searched php.ini in the panel but there was no such file named "php.conf.d" .. Is there any command for ssh to enable all these extensions? Also if there is, then please tell the command to disable as well. If it's something which could be done from the admin panel only, then please provide better steps and exact ones...
I am sorry but I am a beginner.. Hope no one gets dissapointed!

Thanks
Waiting for reply
 
Last edited:
Top