[Wine]Running wine from php pages
acarvalho at abordo.com.br
Fri Jun 10 09:29:50 CDT 2005
I had a similar problem, I found out that even if the program doesn't
display anything, Wine needs an X server.
So instead of having an X server running on the web server just for
that, I decided to use the program Xvfb that comes with Xfree.
It's a dummy Xserver that can be used for testing and worked for me to
run windows applications via wine on the web server.
Just start during boot:
Xvfb :1 &
When you want to run the application, on your test.sh don't forget to
set the DISPLAY variable to :1 and that the apache user must have write
permissions on the directory.
Hope this helps,
By the way, remember that when you run wine from the web server, you
have to have wine setup for that user because it will be executed as the
apache user or whatever is configured there.
Eric Yu-Wei Sung escreveu:
> In a Readhat 9 system, I have a simple php file "test.php" with the
> following content to generate Setup.exe:
> echo exec("pwd");
> exec('/usr/bin/wine rar a -a -c- -cfg- -k -m4
> -zc:\\\\zipper\\\\Setup.cmt -sfx Setup.exe @c:\\\\zipper\\\\Setup.lst ');
> When I run it as a CGI script via command line as "php test.php" . The
> .exe is successfully generated. However, if I load test.php from the
> browser, the result of "pwd" is shown on the browser but the Setup.exe
> is not generated at all. I also tried embeded the above wine command
> inside a shell script test.sh and call the script from the php page,
> for example:
> but again, the wine command does not produce Setup.exe if test.php is
> loaded from a browser.
> Any idea why?
> wine-users mailing list
> wine-users at winehq.org
More information about the wine-users