Answer the question
In order to leave comments, you need to log in
How to run linux terminal command via php?
Hello!
The problem is this. On my VPS there is a file that should be converted using the program with the arguments passed to it.
By accessing the server through the terminal in Linux and executing the command, the converted file is created in the destination folder. The command is below.
biom convert -i web/bogdan.kirukhin67.example.com/public_html/files/otu_table_filtered.biom -o web/bogdan.kirukhin67.example.com/public_html/files/file.txt --to-tsv --header-key taxonomy
Actually, I tried to write in PHP the same thing of the following type;
exec("biom convert -i web/bogdan.kirukhin67.example.com/public_html/files/otu_table_filtered.biom -o web/bogdan.kirukhin67.example.com/public_html/files/file.txt --to-tsv -- header-key taxonomy")
When called via PHP, nothing happens. What could be the problem?
Maybe this is due to the fact that when I log in through the terminal, I log in with admin rights, and in the case of a call via PHP, there is no authorization ...
In general, please tell me how to make everything work. Thanks in advance!:)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question