Re: Re: PHP hangs when exec'ing SSH

From: Date: Thu, 10 Mar 2005 20:17:19 +0000
Subject: Re: Re: PHP hangs when exec'ing SSH
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-210462@lists.php.net to get a copy of this message
> I actually do care about the return code from the program, as well as > knowing that the program executed and completed successfully, so > background execution is not a valid option. > > I tried using system("ssh user@host mycommand > /dev/null 2>&1") and got > the same results. > > You are correct that I am using "su" to become the same user that the > web server runs under, after temporarily changing the password file to > give said user a valid shell. I can verify that the shell does not > affect whether this problem occurs or not, and I have determined that > the SSH process is not left lying around after it executes- The remote > command is run, ssh executes, PHP simply never comes back. > > Bug link is here: http://bugs.php.net/bug.php?id=22946 > > At this point I'd love to hear from anyone running a different version > of PHP, OS, or Apache who can actually execute this to find out if they > experience results which are the same or different. I believe 'su' requires an actual TTY connection or it aborts... Could be wrong. "man su" Why are you doing ssh anyway? scp, maybe, but... Sure you're not taking web-based user into and then doing SSH to execute it on a different server?... [shudder] -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#210462) next »