Make shell_exec work on vps with Ubuntu

Job ID: 33314469

Budget: €8 – €30 EUR

I would like to have shell_exec working on my (new) VPS.
This VPS will be used for development, only for (internal) projects of one company.
The VPS is running Ubuntu 20.04 with virtualmin on php7.4

Why am I thinking shell_exec is not working:
The script placed on this vps uses shell_exec and is working on another VPS.
The code in shell_exec is working when executed directly in the terminal.
Also a test.php file with this code:
<?php
shell_exec("echo hello world");
?>
is also not showing "hello world".

Also shell_exec is NOT disabled in php.ini.

I read a lot of comment on stackoverflow about need to declare the PATH for the user. But I don't know what to do with this.

Who can help me to make this work?
Related categories: PHP System Admin Linux Apache Ubuntu