-
-
Notifications
You must be signed in to change notification settings - Fork 898
Closed
Description
Version 3.0.38 changed behavior for execution time.
If multiple exec commands are run in version 3.0.38 (or 3.0.39) is throw error maximum execution time exceeded. It works correctly in version 3.0.37.
Example for reproduce problem (sleep 1 simulate more difficult command):
<?php
set_time_limit(30);
$sftp = new \phpseclib3\Net\SFTP('host', 22, 60);
$sftp->login('login', 'password');
$sftp->setTimeout(0);
$idx = 0;
do {
$sftp->exec('sleep 1; echo test;');
var_dump($idx);
$idx++;
} while ($idx < 60);
echo 'OK';
Correct output in version 3.0.37:
int(0) int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) int(9) int(10) int(11) int(12) int(13) int(14) int(15) int(16) int(17) int(18) int(19) int(20) int(21) int(22) int(23) int(24) int(25) int(26) int(27) int(28) int(29) int(30) int(31) int(32) int(33) int(34) int(35) int(36) int(37) int(38) int(39) int(40) int(41) int(42) int(43) int(44) int(45) int(46) int(47) int(48) int(49) int(50) int(51) int(52) int(53) int(54) int(55) int(56) int(57) int(58) int(59) OK
Maximum execution time exceeded throw in version 3.0.38 or 3.0.39:
int(0) int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) int(9) int(10) int(11) int(12) int(13) int(14) int(15) int(16) int(17) int(18) int(19) int(20) int(21) int(22) int(23) int(24) int(25) int(26) int(27)
Fatal error: Maximum execution time of 30 seconds exceeded in /vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 3554
Metadata
Metadata
Assignees
Labels
No labels