I am currently on top of ssh on a remote CentOS 5.6 system that runs the Apache web server. I need to use the poppler pdftohtml pdftohtml , which unfortunately is not currently installed on this machine. So I downloaded the poppler package and built it under my user folder. Since I am not a system administrator, I did not
make install
and I have all my compiled files in
/users/myfolder/poppler-0.18.2/
The file I need to execute through php shell_exec() is
/users/myfolder/poppler-0.18.2/utils/pdftohtml
If I executed it through my ssh bash, I get the correct output. If I instead put this line in a PHP script:
echo shell_exec("/users/myfolder/poppler-0.18.2/utils/pdftohtml");
I get the following output:
sh: /users/myfolder/poppler-0.18.2/utils/pdftohtml: Permission denied
I tried to set file permissions for 777, which are currently -rwxrwxrwx. I also noticed that using shell_exec("whoami"); leads to "apache". Can apache execute the script if the file permissions are rwxrwxrwx?
I also know that installing poppler through make install will solve the problem, but since this is intended for testing, I would like to avoid "infecting" the system outside my personal folder until testing is complete.
Thanks to everyone who will help!
source share