simonlai
asked on
apache & PHP 'exec'??
Dear all:
i try using with php 'exec' to execute a linux command. but it given non-response (not output).
but once i run the command with ssh, not problems on the command.
beside that i have check audit.log, can't found any log related. And i was add permission under sudoers file.
apache ALL=NOPASSWD:/usr/local/bi n/tesserac t ALL
can any one guide how to troubleshoot? I was try with & without SELINUX.
thanks.
i try using with php 'exec' to execute a linux command. but it given non-response (not output).
but once i run the command with ssh, not problems on the command.
beside that i have check audit.log, can't found any log related. And i was add permission under sudoers file.
apache ALL=NOPASSWD:/usr/local/bi
can any one guide how to troubleshoot? I was try with & without SELINUX.
thanks.
ASKER
thanks for reply. sudaraka.
The command wiill generate a txt file in the direction. But it was not. Even i disabled SELINUX, still not able to run the command with apache.
I checked the direction, the permission was open.
thanks.
The command wiill generate a txt file in the direction. But it was not. Even i disabled SELINUX, still not able to run the command with apache.
I checked the direction, the permission was open.
thanks.
ASKER
this my command
exec("tesseract /var/www/html/ipc/ocr/".$destination." /var/www/html/ipc/ocr/uploadfile/".$nameFile."");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for your guide...... sudaraka
You are welcome, Thanks for the points.
To get an out put in exec you need to initialize the second parameter as an array.
Open in new window