Net_SSH2::getStdError PHP Method

getStdError() public method

Get the output from stdError
public getStdError ( )
    function getStdError()
    {
        return $this->stdErrorLog;
    }

Usage Example

Example #1
0
 public function deploy()
 {
     $releaseId = $this->dataBase->startRelease();
     $ssh = new Net_SSH2(SSH_SERVER);
     $key = new Crypt_RSA();
     $key->setPassword(SSH_PASSWORD);
     $key->loadKey(file_get_contents(PATH_TO_PRIVATE_KEY));
     if (!$ssh->login(SSH_LOGIN, $key)) {
         $this->dataBase->logStep($releaseId, 'ssh ' . SSH_SERVER, ['error' => 'Login failed'], 1);
         exit('Login Failed');
     }
     $ssh->enableQuietMode();
     $command = $this->bash->dtLock('sandbox-mercury', 'mercury');
     $output['success'] = $ssh->exec($command);
     $output['error'] = $ssh->getStdError();
     $this->dataBase->logStep($releaseId, $command, $output, $ssh->getExitStatus());
     $command = $this->bash->dtPrep('sandbox-mercury', 'mercury', ["mercury" => "dev"]);
     $output['success'] = $ssh->exec($command);
     $output['error'] = $ssh->getStdError();
     $this->dataBase->logStep($releaseId, $command, $output, $ssh->getExitStatus());
     $command = $this->bash->dtPush('sandbox-mercury', 'mercury');
     $output['success'] = $ssh->exec($command);
     $output['error'] = $ssh->getStdError();
     $this->dataBase->logStep($releaseId, $command, $output, $ssh->getExitStatus());
 }
All Usage Examples Of Net_SSH2::getStdError