Page 1 of 1

[solved] problem executing external script from php

Posted: Wed Sep 21, 2005 10:16 pm
by andre_c
i'm trying to execute a program through php using backticks (or shell_exec) and it's not working.
it just returns null and the program doesn't run, no errors.

this is the code:

Code: Select all

<?php
echo shell_exec('/opt/fop/fop.sh simple.fo simple.pdf');
?>
and i get one line in the error_log that says

Code: Select all

sh: /opt/fop/fop.sh: Permission denied
the 'fop.sh' script is 755 and the directory is owned by apache (which is what the webserver runs as)
the server is fedora 4 and apache was installed using yum
SELinux is disabled

any ideas?

Posted: Thu Sep 22, 2005 1:16 am
by andre_c
never mind...
SELinux was running and that was the problem... my bad
i just turned it off for the httpd daemon