I am trying to convert a pdf
file into text file. When I run the command through terminal its working fine but when try to execute it through PHP
it's not working.
I am stuck in this situation from last four hour spend lots of time in google but no solution available. Can any body resolve this issue?
File owner - nobody
shell_exec('/usr/bin/pdftotext /opt/lampp/htdocs/foldername/filename.pdf');
Can anyone provide any helpful solution?
I also tried to change usr
folder ownership from root to nobody and provide 777 permission on folder and its context.
exec
and view the $output, what do you get? Should look something like:exec('/usr/bin/pdftotext /opt/lampp/htdocs/foldername/filename.pdf',$output = array()); var_dump($output);
chown apache /usr/bin/pdftotext/
But before this, stop apache,server httpd stop
then 'su apache` and check the command