krups Posted August 23, 2006 Share Posted August 23, 2006 I am new to php and have a problem with the following php commads. exec(), system(), passthru(), shell_exec(). These commands when executed always left a defunct process. Then when I reconfigured php with --enable-sigchild option it was better as now it does not leave a defunct process always..... but mosttimes we still get defunct process. I wrote code to kill defunct process. The code executes correctly. The defunct process also gets killed but later the page is not displayed. Looks like php hangs.exec("/bin/kill -9 $ppid";);system("/bin/kill -9 $ppid /dev/null/ 2>&1 &");passthru(kill -9 $ppid &);shell_exec(bin/kill -9 $ppid &);Also tried posix_kill($ppid, 1); where $ppid is parent process id. Is there any conifuration options that I should use or any php.ini parameters that I should change. Please help me with this query. We are using PHP with apache. The configure option is as mentioned below.'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mm=/usr/local' '--enable-sigchild' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-fastcgi' '--enable-pcntl' '--enable-posix' Quote Link to comment Share on other sites More sharing options...
krups Posted August 24, 2006 Author Share Posted August 24, 2006 Got no replies for my query. Please can someone suggest if I am missing any configuration parameters or any php.ini parameters to solve this problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.