Eka Permana
2005-Aug-24 04:25 UTC
[Wine]Running wine from php pages with "Xvfb" not success for my machine
I am sorry before, cause my english is poor.
My machine is : i686 and I use RedHad Enterprise Linux AS Rel.3,
Apache 1.3.33 and PHP 4.4.0. Simply, I want to run an Windows
application via PHP page with WINE emulation. (Newest version of WINE
updt. August 2005)
I have a simple a PHP file "wine.php", that will load an windows
application via PHP page. The contents is:
===========================================================<?php
echo 'Executing WINE';
exec ('/usr/local/apache/htdocs/lat/my_script.sh');
?>
===========================================================
And the contents of "my_script.sh" is:
===========================================================#!/bin/bash
echo "hello, $USER. Please wait... Executing an application
wine /home/takeda/app.exe
===========================================================
When I run "my_script.sh" via command line:
/usr/local/apache/htdocs/lat/my_script.sh
The "app.EXE" running sucessfully. But when I execute the
"wine.php"
the "app.EXE" not loading and not display any errors.
I also try the program Xvfb (X Virtual Frame Buffer) but I have the
problem again. When I try to use command on Konsole (Command line):
[takeda@localhost / ]$ Xvfb
Found Error with the message:
=======================================Fatal Server error:
Server is already active for display 0
If this server bla...bla...bla.. , remove /tmp/.X0-lock and start again.
=======================================
But when I remove "/tmp/.X0-lock" with SuperUser mode and I start to
typing "Xvfb" on Shell again. I have problem again Konsole give ne an
message like this:
=========================================================_XSERVTransSocket
.......: ....... SocketCreateListening() failed
__XSERVTransMakeAllCOTS.... : Server already running
Fatal server error:
Cannot establish any listening socket - Make sure an X server isn't
already running
==========================================================
What happen? what my problem is? X Server Already running? why? and
how to solve it?
I am not set my ".bash_profile" on folder /home/takeda before
But I am already :
- Add apache to the local list of user for the Xserver
I use the command: xhost +local:apache@
- Change my "/etc/passwd"
From :
apache:x:48:48:Apache:/var/www:/sbin/nologin
To:
apache:x:48:48:Apache:/var/www:/bin/bash
I am sorry, if I to much writing, but that is to describe my machine
and my problem too. I need your help.
Thanks
Eka Permana
André Carvalho
2005-Aug-24 13:45 UTC
[Wine]Running wine from php pages with "Xvfb" not success for my machine
Eka, First you create a wine environment for the apache user. Then if you don't have an X server running on this machine, use Xvfb by running in your startup script : Xvfb :1 & on your script, just add: export DISPLAY=:1 ===========================================================#!/bin/bash export DISPLAY=:1 echo "hello, $USER. Please wait... Executing an application wine /home/takeda/app.exe =========================================================== If you use Xvfb you don't need xhost and the error you had is because you try to use another X server on display 0, but you already have one running on :0 that's why you need to run Xvfb :1 instead. Hope this helps. Andr? Carvalho Eka Permana wrote:>I am sorry before, cause my english is poor. > >My machine is : i686 and I use RedHad Enterprise Linux AS Rel.3, >Apache 1.3.33 and PHP 4.4.0. Simply, I want to run an Windows >application via PHP page with WINE emulation. (Newest version of WINE >updt. August 2005) >I have a simple a PHP file "wine.php", that will load an windows >application via PHP page. The contents is: >===========================================================><?php >echo 'Executing WINE'; >exec ('/usr/local/apache/htdocs/lat/my_script.sh'); >?> >===========================================================> >And the contents of "my_script.sh" is: >===========================================================>#!/bin/bash >echo "hello, $USER. Please wait... Executing an application >wine /home/takeda/app.exe >===========================================================> >When I run "my_script.sh" via command line: >/usr/local/apache/htdocs/lat/my_script.sh > >The "app.EXE" running sucessfully. But when I execute the "wine.php" >the "app.EXE" not loading and not display any errors. > >I also try the program Xvfb (X Virtual Frame Buffer) but I have the >problem again. When I try to use command on Konsole (Command line): > >[takeda@localhost / ]$ Xvfb > >Found Error with the message: >=======================================>Fatal Server error: >Server is already active for display 0 >If this server bla...bla...bla.. , remove /tmp/.X0-lock and start again. >=======================================> >But when I remove "/tmp/.X0-lock" with SuperUser mode and I start to >typing "Xvfb" on Shell again. I have problem again Konsole give ne an >message like this: >=========================================================>_XSERVTransSocket .......: ....... SocketCreateListening() failed >__XSERVTransMakeAllCOTS.... : Server already running > >Fatal server error: >Cannot establish any listening socket - Make sure an X server isn't >already running >==========================================================> >What happen? what my problem is? X Server Already running? why? and >how to solve it? > >I am not set my ".bash_profile" on folder /home/takeda before > >But I am already : >- Add apache to the local list of user for the Xserver > I use the command: xhost +local:apache@ >- Change my "/etc/passwd" > From : > apache:x:48:48:Apache:/var/www:/sbin/nologin > To: > apache:x:48:48:Apache:/var/www:/bin/bash > >I am sorry, if I to much writing, but that is to describe my machine >and my problem too. I need your help. > >Thanks > >Eka Permana > >_______________________________________________ >wine-users mailing list >wine-users@winehq.org >http://www.winehq.org/mailman/listinfo/wine-users > >
Possibly Parallel Threads
- Running wine from php pages with "Xvfb" not fix yet
- Question: write an R script with help information available to the user
- how to exec a directory creation before downloading a file to that directory?
- running JPEG device on R 1.9.1 using xvfb-run on Linux
- Xvfb and R