nginx - Can't execute yolo/darknet from php exec - predictions.png never appears? -
yolo: https://github.com/pjreddie/darknet
i'm trying run within php script, predictions.png never appears. assume general problem understanding of how exec works, rather how yolo works.
i've changed permissions , users on relevant folders , directories nginx/777. know that's not ideal it's troubleshooting step!
what happens when calling darknet terminal:
logging output appears on screen, , @ end of process file called predictions.php should created in /darknet directory. when running php in browser don't care logging output, want png file created.
works:
/darknet/darknet detect /darknet/cfg/yolo.cfg /darknet/yolo.weights /path/to/photo.jpg works:
sudo -u nginx php71 -r 'exec("/darknet/darknet detect /darknet/cfg/yolo.cfg /darknet/yolo.weights /path/to/photo.jpg");' works commandline (php71 myfile.php), not in browser:
<?php exec("/darknet/darknet detect /darknet/cfg/yolo.cfg /darknet/yolo.weights /path/to/photo.jpg"); what doing wrong?
Comments
Post a Comment