ssh_exec, isn't working.
#3

Quote:
Originally Posted by Schurman
Посмотреть сообщение
http://php.net/manual/en/function.ssh2-exec.php
http://php.net/manual/en/function.sleep.php

I don't see anything wrong with those. Please explain your problem better.

EDIT: (OFFTOPIC) Check your PMs.

EDIT 2: Debug this.

PHP код:
$sshCmd "cd /home/igetty/samp/";
$sshCmd2 "screen ./samp03svr";
echo(
"Output for command $sshCmd:<br><samp>");
$stdout_stream ssh2_exec($connection$sshCmd); //Execute the command and collect the raw IO stream.
$stderr_stream ssh2_fetch_stream($stdout_streamSSH2_STREAM_STDERR); //Fetch the error stream!
while($line fgets($stderr_stream)) { flush(); echo $line."<br>"; } //Read the lines and print them synchronously!
echo("</samp><br>Output for command $sshCmd2:<br><samp>");
$stdout_stream ssh2_exec($connection$sshCmd2); //Execute the command and collect the raw IO stream.
$stderr_stream ssh2_fetch_stream($stdout_streamSSH2_STREAM_STDERR); //Fetch the error stream!
while($line fgets($stderr_stream)) { flush(); echo $line."<br>"; } //Read the lines and print them synchronously!
echo("</samp><br>END OUTPUT"); 
Just did mate!

Come on the TeamSpeak buddy, we'll talk there.

Thanks for the help m'dear! <3
Reply


Messages In This Thread
ssh_exec, isn't working. - by iGetty - 03.02.2013, 02:12
Re: ssh_exec, isn't working. - by SchurmanCQC - 03.02.2013, 02:45
Re: ssh_exec, isn't working. - by iGetty - 03.02.2013, 03:27

Forum Jump:


Users browsing this thread: 1 Guest(s)