How to specify shell with php's shell_exec()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ankush
Forum Newbie
Posts: 10
Joined: Thu Sep 05, 2013 12:22 am

How to specify shell with php's shell_exec()

Post by Ankush »

Hello all
I am developing a web based application which needs to execute system commands from web instead from shell.
I am using shell_exec() method to do it. It does all the the task for me, but problem is that shell_exec() method starts every new command in new shell and causing a huge problem to me. Using shell_exec() method i started a process but now how will i be able to stop that. I hope i am clear to you with my problem . Kindly help me, Thank you!
Ankush
Forum Newbie
Posts: 10
Joined: Thu Sep 05, 2013 12:22 am

Re: How to specify shell with php's shell_exec()

Post by Ankush »

Is there any one who can help?? or this is a passive forum???? I can't see any body active here or helping me
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to specify shell with php's shell_exec()

Post by Christopher »

You could use the proc_* functions (http://www.php.net/manual/en/book.exec.php) or use the PCTL extension (http://php.net/manual/en/book.pcntl.php).
(#10850)
Post Reply