Home > Archive > PHP Programming > February 2005 > Possible to check to see if Windows process is running from PHP?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Possible to check to see if Windows process is running from PHP?
|
|
| wrybread@gmail.com 2005-02-21, 3:57 am |
| I need to check the state of a processes from within a PHP script on a
Windows machine. All I need to know is whether or not the process
exists (i.e., is running). Anyone have any ideas?
I searched the archives and found proc_open(), but if it can do what
I'm trying to do, I can't figure out how.
| |
| Chung Leong 2005-02-21, 3:57 am |
| <wrybread@gmail.com> wrote in message
news:1108937050.288502.91410@o13g2000cwo.googlegroups.com...
> I need to check the state of a processes from within a PHP script on a
> Windows machine. All I need to know is whether or not the process
> exists (i.e., is running). Anyone have any ideas?
>
> I searched the archives and found proc_open(), but if it can do what
> I'm trying to do, I can't figure out how.
>
Google for tlist.exe (pre-XP) or tasklist.exe (XP).
| |
| Andy Hassall 2005-02-21, 8:56 pm |
| On Mon, 21 Feb 2005 00:27:20 -0500, "Chung Leong" <chernyshevsky@hotmail.com>
wrote:
><wrybread@gmail.com> wrote in message
>news:1108937050.288502.91410@o13g2000cwo.googlegroups.com...
>
>Google for tlist.exe (pre-XP) or tasklist.exe (XP).
There's also some goodies here that may be of use:
http://www.sysinternals.com/ntw2k/f...e/pstools.shtml
(And various other useful tools on that site)
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
| |
| wrybread@gmail.com 2005-02-22, 8:55 am |
| Thanks so much, that pslist did the trick perfectly.
| |
| alanbe 2005-02-22, 3:57 pm |
| >>I need to check the state of a processes from within a PHP script on
a[color=darkred]
[color=darkred]
Curious. Why do you need to do this?
What processes runnng in Windows are you interested in?
| |
| wrybread@gmail.com 2005-02-25, 8:56 am |
| I built a photobooth, and PHP does the scripting. So the PHP script
(running in Windows) tells a program called PSRemote to take 4
pictures, then PHP passes the pictures to a Photoshop droplet to
arrange them in a strip, then prints them, then the PHP script uploads
the pics.
The problem is, if someone clicked the button to take more pics while
the script was running, it would crash. So a kludgey solution was to
check if the processes php.exe was running, and if so abort. In essence
I'm preventing multiple instances of the script.
Here's the photobooth, if you're interested:
http://wrybread.com/photobooth
|
|
|
|
|