shell_exec not working not able to convert pdftotext

view story

http://stackoverflow.com – I am trying to convert a pdf file into text file. when I run command through terminal its working fine but when try to execute it through PHP its 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'); (HowTos)