I am trying to run convert 'sample_(2).pdf[1]' 'sample.jpg' through php exec like below
> exec(" convert 'sample_(2).pdf[1]' 'sample.jpg' ");
But it is not working in php but works great in terminal. I tried below codes also to check wethee exec is working with php.
echo exec('whoami');
//It is working and giving me result
exec("cp 'sample_(2).pdf' sample2.pdf");
//It is not working.
But all the commands are running in terminal. Any idea would help me. I am scratching my head for the last two days.
EDIT
I got it working. There were mistakes with my file path.