unable to run oowriter as web user

后端 未结 5 440
-上瘾入骨i
-上瘾入骨i 2021-01-17 19:00

I have a web server set up on my laptop. I am building a web application which I am accessing through the local network. I have a php file which contains the following lines

5条回答
  •  梦毁少年i
    2021-01-17 19:35

    Fraber's answer solved the problem for me!

    Used:

    $cmd = 'HOME='.getCWD().' && export HOME && libreoffice --headless ....';
    exec($cmd);
    

    libreoffice then created '.config' and 'libreoffice' directories in the php script directory. Obviously it must be writeable by the webserver process.

提交回复
热议问题