How to use Wine from Apache/Php? - '/var/www' is not owned by you

后端 未结 7 1307
被撕碎了的回忆
被撕碎了的回忆 2020-12-18 06:55

I need to run a windows command line tool from a php script on my Debian server. For that, I\'m trying Wine. Invoking wine and the tool via terminal works fine: \"$ wine too

7条回答
  •  不思量自难忘°
    2020-12-18 07:47

    You should create a separate home directory for running Wine. Create a directory which is owned by www-data, set the HOME variable, su www-data, and run winecfg once; then run tool.exe (as that user). In the exec call, make sure that HOME is set (try exec("HOME=/tmp/wine wine tool.exe"))

提交回复
热议问题