I am trying to build PHP
wrapper for PowerBI
. I installed PowerBI Cli
(https://github.com/Microsoft/PowerBI-Cli) on my local and when I run any PowerBI Cli command on my terminal, it is working well. It is working well even when I run the commands using the _www
user (sudo -u _www powerbi config
)
However, when I run them through PHP
using either shell_exec
or Symphony's Process Component
(https://symfony.com/doc/current/components/process.html), I am getting the following exception:
env: node: No such file or directory.
I am facing this issue on Mac Sierra
. The commands are working well on Linux
using the PHP exec()
Try linking,
"ln -s /path/where/command/is stored/ /to/path/where u want to exec/"
Sometimes the program are stored in usr/local/bin/program
meanwhile as per default you are executing in usr/bin/program
And then in shell use the new path you have set.
Example for linking suppose if you have path for command,
/usr/bin/powerbi
then with above command you can link new path usr/powerbi
after that you can use new path in exec or shell command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With