I try to run gnome tracker-search from php. For example like this:
<?php
$result = shell_exec("/usr/bin/tracker-search -l 5 --disable-snippets --disable-color test");
echo "<pre>$result</pre>";
?>
But the output is empty. When I run /usr/bin/tracker-search --help
in php, I get the help output. I also try to put tracker-search in the visudo file, but it have also no effect.
Have anybody an Idea what's happen here?
print_r($result)
orvar_dump($result);
should help you out. don't use echo , you might be having a array in return.var_dump($result);
I getNULL
.... or NULL if an error occurred or the command produces no output.