php – unoconv命令作为apache运行时出错
作者:互联网
以下是当unoconv命令作为apache运行时我得到的错误,使用root它工作正常.
[root@tux1 apache]# sudo -u apache unoconv -f pdf /var/www/html/testing/example.xlsx
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
Error: Unable to connect or start own listener. Aborting.
解决方法:
好吧,这可能是一种愚蠢的方式绕过它,但这里…
工具链中的某些东西需要一个主目录. Apache的用户没有主目录.
我的Apache2作为www-data运行.
所以:
mkdir /home/www-data
chown www-data:www-data /home/www-data
瞧!没有更多的错误.
如果我是一个真正的极客,我会在工具链中进一步解决问题,但我不是那样.
标签:php,pdf-generation,openoffice-org,shellexecute 来源: https://codeday.me/bug/20190614/1237941.html