[Wine] Running wine via php
Martin Gregorie
martin at gregorie.org
Mon Feb 8 05:26:53 CST 2010
On Mon, 2010-02-08 at 05:04 -0600, asmith wrote:
> Thanks for the replay.
>
> I compared them:
>
> PWD in shell is /root, with php is the document root of my site.
> HOME in shell is /root, with php is /var/www
> PATH in shell is /usr/lib/kde4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin but in php it is /sbin:/usr/sbin:/bin:/usr/bin
>
> Another vairable in shell is:
> _=/usr/bin/env
> in php:
> _=/etc/init.d/php-fastcgi
>
> Should I change these for php and how? and how to set them b ack after
> I ran the program?
>
Do you see any error messages?
Is your webserver writing anything useful to the error log?
If so, that should help you figure out which environment variables need
changing.
As I said, I don't know php, but I'd guess that anything you set between
the <php> tags gets discarded once the PHP script has been run, so:
- try setting environment variables before calling shell_exec()
- alternatively, try writing a wrapper shell script that sets the
environment and runs wine and shell_exec() that instead.
Martin
More information about the wine-users
mailing list