I'm getting some odd behaviour from Wine when I call it from PHP, and
I was wondering if someone who has the command line version of PHP
installed would be willing to give the following test a try to see if
it is something local to me or not.
When I call Wine from a PHP script, it runs perfectly quickly. When I
call that PHP script from another one, the whole thing slows down
dramatically. Here's a geeky summary:
temp$ which php
/usr/local/bin/php
temp$ ls
bar.php foo.php
temp$ cat foo.php
#!/usr/local/bin/php
<?php
`./bar.php`;
?>
temp$ cat bar.php
#!/usr/local/bin/php
<?php
`wine --version`;
?>
temp$ time wine --version
Wine 20041019
real 0m0.016s
user 0m0.002s
sys 0m0.006s
temp$ time ./bar.php
Wine 20041019
real 0m0.023s
user 0m0.008s
sys 0m0.006s
temp$ time ./foo.php
Wine 20041019
real 0m3.034s
user 0m0.013s
sys 0m0.008s
Note the 3 second real time penalty for calling Wine from the second
level PHP script.
I don't see this with other utilities called from PHP, and I don't see
this problem with Wine called from shell scripts. If someone could
run foo.php and bar.php and post what they see, I'd appreciate it.
Thanks,
- Bruce
PS, I'm running PHP 4.3.9 on 64-bit Fedora Core 2, for reference.