Launch Windows Program from PHP
| From: | Matt Neimeyer | Date: | Tue, 14 Jul 2009 04:51:42 +0000 |
| Subject: | Launch Windows Program from PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-295344@lists.php.net to get a copy of this message | ||
I'm probably just not Googling right... Short version: How can I
launch a program for the current user sitting in front of a windows
web server?
Longer version: I've written a PHP app to migrate data from the FoxPro
version of our product to the upcoming MySQL version. I have a self
contained setup on an XP box consisting of XAMPP, DBConvert (a data
conversion program) and the ODBTP client/server. Phase 1 is a PHP app
the pre-preps the data through ODBTP to a local FoxPro DBC. Phase 2 is
the DBConvert and Phase 3 is a PHP app again doing post-conversion
stuff in MySQL.
To help in automating the whole shebang I'd like to automatically
launch DBConvert with a command line argument (for the right data
conversion stored session). Whenever I Google I find stuff about
launching background tasks or using things like popen to launch
processes "inside" the web server. I don't care if the owner of the
process is the user at the keyboard just that they can interact with
it.
And if its Christmas and I can get everything I want :)... I'd love
for PHP to be able to watch the process and stay resident until it
exits so at that point I can send a final bit of javascript that will
cause "phase 3" to automatically start.
Any ideas?
Thanks!
Matt