Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-12 Thread Ross Becker
Ah. Well, then my bug report is probably of no matter. Even looking further into SSH's options, there's something for controlling the TTY allocated for SSH, but it only controls what TTY SSH allocates, there is no means for turning tty allocation off completely. I was still holding out some hop

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-11 Thread Rasmus Lerdorf
Ross Becker wrote: 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

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-11 Thread Ross Becker
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 compl

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-11 Thread Rasmus Lerdorf
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

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
Incorrect. Setup now: Server A: Authenticates User SSL -> runs PHP -> runs SSH [EMAIL PROTECTED] Server B: Authenticates user SSH -> runs command "su" is not involved, and has not been involved- I stated in my original post, and in my last reply to you that it was only used in order for me to

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Richard Lynch
>I'm really not sure what you're asking here. I've created a limited > access user account on a remote host so that I can kick off some things > on the remote host by hitting a web page. Access to the web page is > protected via SSL and user authentication. The things which are > executed on

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
Richard, I'm really not sure what you're asking here. I've created a limited access user account on a remote host so that I can kick off some things on the remote host by hitting a web page. Access to the web page is protected via SSL and user authentication. The things which are executed

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Richard Lynch
> 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 [EMAIL PROTECTED] mycommand > /dev/null 2>&1") and > got > the same results. > > Yo

RE: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Chris W. Parker
Ross Becker on Thursday, March 10, 2005 11:50 AM said: ugh: top posting. ugh ugh: no trimming! oy vey! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
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 [EMAIL PROTECTED] mycommand > /dev/null 2>&1") and got the same results. You are correct

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Jamie Alessio
There is no output to stderr or stdout from the script being executed. All I care about are the side-effects of running this remote program. If something fails, a numeric error-code will be returned. Ross, Since you don't care about the output from the program can you start the process in the b

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
There is no output to stderr or stdout from the script being executed. All I care about are the side-effects of running this remote program. If something fails, a numeric error-code will be returned. I have tried this using: system(), shell_exec() - same as backtick operator, and popen(). I ha

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Jamie Alessio
I'm attempting to execute some things on remote servers using ssh, using a strictly limited account created for this express purpose. I set up passwordless key authentication from the user the web server runs as to the limited account on the remote server. I wrote some PHP code which calls: sys