Hello,
I’m trying to run a pygmt script in PHP, the problem that I have is that every time I run the script
$command = escapeshellcmd("sudo /opt/miniconda3/envs/pygmt/bin/python3 gmt_generator.py
$arr_lon $arr_lat $arr_dep $arr_mag");
$output= shell_exec($command);
echo $output;
It fails in finding the pygmt module (The other modules work fine) but when I run the python script directly on the server it work fine.
I know this is more related to PHP or the permission on the system, but I already have the permissions for the Apache.
Does someone already have this problem and know how to fix this?
Thanks,