Php word to pdf-php execute exec to convert word to pdf permission

Source: Internet
Author: User
Server: ubuntu14.04PHP: 5.4 apache: invalid varwwwwwwrootUploaddoc & #39; tes execphp word to redirect phpexec permission

Server: ubuntu14.04
PHP 5.4
Apache: 2.0
I follow the methods found on the Internet to jdk1.7.0 _ 79, jodconverter-2.2.2 have been installed, and then use root login server, enter the command java-jar/alidata1/source/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar/var/www/wwwroot/Upload/doc/test.doc/var/www/wwwroot/Upload/doc/'testbench yes, however, you cannot run this command in the PHP file. The return value is always int (127). the result returned by whoami is www-data, then I changed wwwroot and source on the server from root to www-data. The result is still int (127 ),
// Shell_exec ('whoam ');
Exec ('Java-jar/alidata1/source/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar/var/www/wwwroot/Upload/doc/test.doc/var/www/wwwroot/Upload/doc/testbench 2>/var/www/wwwroot/log.txt ', $ arr, $ res );
Var_dump ($ arr, $ res );
?>
In this way, sh: 1: java: not found is obtained.
Which of the following Experts knows whether this is a permission issue? How should I adjust it? Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.