[Wine] Running wine via php
Gert van den Berg
wine-users at mohag.net
Thu Feb 11 01:48:54 CST 2010
On Thu, Feb 11, 2010 at 09:15, asmith <wineforum-user at winehq.org> wrote:
> I enabled error logging and no error was there.
> But funny thing, I changed
> 'wine c:\\\\program.exe'
> 'wine /root/.wine/drive_c/program.exe'
> and it worked. I tried c:\\program.exe, but nothing.
> However I have another problem. the original line was like this: (sending a file to the program)
> wine program.exe -file test.ext
> now this in shell:
> wine /root/.wine/drive_c/program.exe -file test.ext
> works fine as it should.
> but same line in php, tells that the program can't find the file.
> test.ext is in .../drive_c/temp and the program always look for files in the temp folder. so it finds the file in temp folder if it is in shell, but it can't infd the file if it is in php.
> Any idea?
You shouldn't run Wine as root...
You need to put it somewhere writeable to the user that your web
server is running as. Set the WINEPREFIX variable to the location of
your .wine directory. This directory MUST be owned by the user running
Also make sure you don't call Wine with any untrusted parameters...
Check apache's error log again... For CGI scripts at least, it should
have everything that was written to stderr.... Not sure about PHP...
More information about the wine-users