answering to http://php.net/manual/en/function.posix-getppid.php#120088
if you're using proc_open and you want to get the pid of the calling php-process, use proc open with usage "exec php $scriptname". In that case, you can get the real parent-id, because php doesn't start a new shell.