You are here: Re: [PHP] Re: PHP hangs when exec'ing SSH « PHP « IT news, forums, messages
Re: [PHP] Re: PHP hangs when exec'ing SSH

Posted by Richard Lynch on 10/20/39 11:10

> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация