Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

ending a program

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

ending a program

Postby LTLhawk » Sun Jul 27, 2003 4:14 pm

Hi again,

Is there a way to kill a task thru php. There is a small dos program that runs in the background on my server that I need to end in order to copy the log file. After I have backed up the log file I will restart the program. I just need to know how to kill it first..

thanks
LTLhawk
New php-forum User
New php-forum User
 
Posts: 29
Joined: Fri Mar 07, 2003 4:17 pm

Postby swirlee » Sun Jul 27, 2003 8:03 pm

Since PHP is designed to be run on many platforms, and process-killing is a very OS-specific function, PHP doesn't provide this capability. However, if you can find (or create) a program which can be made to kill another process via the command line (in Linux, this is trivial, but I don't belive Windows comes with any such functionality), you can use the program execution functions to issue the kill command. A brief search found this page, which has a few tools which might come in handy. Otherwise, a good Googling should get you what you're after.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby LTLhawk » Mon Jul 28, 2003 2:37 am

thanks swirlee,

I think that will do the trick... Thank you very much...great idea
LTLhawk
New php-forum User
New php-forum User
 
Posts: 29
Joined: Fri Mar 07, 2003 4:17 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron