I created a simple C program that takes an integer argument and outputs that integer plus two. I can run it in a terminal with
./simplep 2
and in PHP with
exec('./simplep 2', $output).
I have a more complicated program called myprogram which involves an external library. I can run it in the terminal with
./myprogram a.mov
but it fails if I run it in PHP with
exec('./myprogram a.mov', $output)
No output is produced, which makes me think the program isn't running at all.
PS. I am working on Mac.
update
From the error ouput I know the problem is the library. It says
dyld: Library not loaded: /opt/local/lib/libjpeg.8.dylib".
But the library file is there.
chmod +xbut still get this error.