Why execute a command with exec is unsuccessful within the script, put it on the server command line, and I've configured it in/etc/sudoers.
I first made the following configuration in/etc/sudoers
And then restarted the next Apache server.
Within the TP frame, write to
EXEC ('/usr/bin/unoconv--server localhost--port 8100-o/usr/local/webserver/www/server/exam/public/uploads/ Resource/transform/document/201309/52419a788a553.pdf-f pdf/usr/local/webserver/www/server/exam/public/uploads/ Resource/untransform/document/201309/52419a788a553.doc ');
Run under, no effect, transcoding is not successful, the code directly out can be executed.
At the same time, I wrote the transcoding section into a shell script.
#!/bin/sh
Turncode () {
Local pdf= ' echo $ | cut-d:-f1 ';
Local file= ' echo $ | cut-d:-f2 ';
Echo $pdf;
Echo $file;
'/usr/bin/unoconv--server localhost--port 8100-o $pdf-F PDF $file '
}
Action= "$"
Setting= "$"
Case $action in
Turncode)
Turncode "$setting"
;;
*)
;;
Esac
Called by exec
EXEC ("sudo./bash turncode $save _path1: $file _path1", $out, $status);
The result is still unable to transcode, who has been kindly pointed out, not very grateful!!! Shell
Share to:
------Solution--------------------
command line, you are using the permissions of your account. The script can be different, completely controlled by the owner or the creator's account permissions.