When I run the following command, it works great...
ls "/searchdir/xmlcontent/349" | head
I put the code above in a shell script, execute it as root, and it still works great.
I need to call it from PHP as root. In my PHP code, I do this:
shell_exec("/bin/bash myshellscript");
However, when I do it from PHP, I get:
ls: write error: Broken pipe
What should I do?
Jon