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 &);
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'
php exec(), system(), passthru(), shell_exec() and posix_kill hangs
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users