PHPを使用して実行可能ファイルをトリガーしています
$commstr = '/abs/path/to/binary > status.txt &';
echo "Running command: ".$commstr."\n";
shell_exec($commstr);
PHPexec()またはそれについてはsystem()、shell_exec()status.txt が書き込まれるため正常に動作しますがcat status.txt、error while loading shared libraries: libQtCore.so.4: cannot open shared object file: No such file or directory. これは、バイナリが実行されないことを意味します
私は自分のphpコードを次のように変更しようとしましたが、うまくいきませんでした
$commstr = 'export LD_LIBRARY_PATH=/path/to/lib ; /abs/path/to/binary > status.txt &';
バイナリはユーザーが読み取り可能でapacheあり、ライブラリも読み取り可能です。