note 128398 added to function.ssh2-disconnect
| From: | PeterRoes at main dot php dot net | Date: | Fri, 14 Apr 2023 18:37:54 +0000 |
| Subject: | note 128398 added to function.ssh2-disconnect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220352@lists.php.net to get a copy of this message | ||
If you derive an sftp connection from an ssh connection you must close the sftp connection before
closing the ssh connection if you use ssh2_dissconnect. In other words:
<?php
$ssh_con=ssh2_connect($sftp_server);
ssh2_auth_password($ssh_con, $sftp_user, $sftp_pass);
$scp_con=ssh2_sftp($ssh_con);
# do stuff with $scp_con
ssh2_disconnect($scp_con);
ssh2_disconnect($ssh_con);
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 143.178.196.22)
----
Manual Page -- https://php.net/manual/en/function.ssh2-disconnect.php
Edit -- https://main.php.net/note/edit/128398
Del: integrated -- https://main.php.net/note/delete/128398/integrated
Del: useless -- https://main.php.net/note/delete/128398/useless
Del: bad code -- https://main.php.net/note/delete/128398/bad+code
Del: spam -- https://main.php.net/note/delete/128398/spam
Del: non-english -- https://main.php.net/note/delete/128398/non-english
Del: in docs -- https://main.php.net/note/delete/128398/in+docs
Del: other reasons-- https://main.php.net/note/delete/128398
Reject -- https://main.php.net/note/reject/128398
Search -- https://main.php.net/manage/user-notes.php