I have two subsequent exec commands. The first executes without issue the second however is throwing an error:
exec('/usr/bin/pdftk A='. trim($original) .' cat A1 output '. trim($onepage), $output, $error);
var_dump($output); var_dump($error);
exec('/usr/bin/pdftk '. trim($onepage) .' background watermark.pdf output '. trim($modified), $output, $error);
var_dump($output); var_dump($error);
The first produces:
array(0) { } int(0)
The second:
array(0) { } int(1)
The permissions on the php script and directories are exactly the same. I've tried ecaping the exec command using escapeshellargs with no luck either.