Shared library not being loaded when php exec() is called -
i triggering executable using php
$commstr = '/abs/path/to/binary > status.txt &'; echo "running command: ".$commstr."\n"; shell_exec($commstr); php exec() or matter system() or shell_exec() works fine because status.txt gets written to, cat status.txt says error while loading shared libraries: libqtcore.so.4: cannot open shared object file: no such file or directory. means binary doesn't executed
i tried changing php code following without luck
$commstr = 'export ld_library_path=/path/to/lib ; /abs/path/to/binary > status.txt &'; the binary readable user apache , libraries.
try running command sudo.
for example
$commstr = 'sudo export ld_library_path=/path/to/lib ; /abs/path/to/binary > status.txt &';
Comments
Post a Comment