I am using Centos 8 as a server.
I am running this command on my server as a root user.
opendkim-genkey --domain=example.com --selector=example --subdomains
This command works properly.
The problem comes while I run/execute this command.
shell_exec("opendkim-genkey --domain=example.com --selector=example --subdomains");
Via browser, the result of this command is an error opendkim-genkey: command not found.
I know that this issue is related to some permission. But I don't know how and where to give the permission to run this command via PHP.
Does anyone have the proper solution for it?