R
R
Roman Khodakovsky2020-05-03 12:12:58
PHP
Roman Khodakovsky, 2020-05-03 12:12:58

How to run php cli script from browser if exec fails?

There is an online store import script written in php cli.
It is necessary that a person could run it not from the command line, but simply by clicking on the link.
exec is enabled, but exec('/usr/bin/php %reference to full path to script% < /dev/null > import.log &', $output); gives no effect.
What could be the problem? The file permissions are correct.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2020-05-03
@h_roman

What effect do you expect? You have all the output redirected to a file, plus the ampersand at the end takes the script into the background. Accordingly, there will be nothing in the $output variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question