Re: Re: PHP hangs when exec'ing SSH

From: Date: Sat, 12 Mar 2005 01:21:40 +0000
Subject: Re: Re: PHP hangs when exec'ing SSH
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-210573@lists.php.net to get a copy of this message
I think you're probably right. My gut is telling me that this has to do with tty funkiness. I tried the batchmode option, but it didn't affect the problem. My bet is that ssh is mucking around with ttys, and PHP is loosing it's connection through apache. The php processing may actually be completing, it's just no longer sending it's output through apache, and apache hasn't figured that out, so apache is standing around waiting for PHP to complete. I'm hoping that the PHP devs may get around to this as a bug and decide it can be fixed- maybe by resetting the tty after returning from a system or whatever. --Ross Rasmus Lerdorf wrote:
Ross Becker wrote:
There's no output (besides the numeric return code) from SSH which I care about- there shouldnt be anything coming back via stdout or stderr. If there is, I'm happy to discard it. This SHOULD be a dead-nuts-simple case of exec the command and wait for it to return.
And if ssh didn't require a controlling tty in interactive mode, you'd be right. But unfortunately it does and you aren't. You could try playing with the batch mode option. I am not sure if that disables the tty requirement or if it simply suppresses prompts. Regardless, this has nothing to do with PHP's exec stuff. -Rasmus


« previous php.general (#210573) next »