|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-10-14 08:15 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:15 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:16 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:16 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:16 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:17 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:17 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:17 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:18 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:18 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:18 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:19 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:19 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:19 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:20 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:21 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:21 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:21 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:21 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:22 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:22 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:22 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:23 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:23 UTC] fashionretailshop01 at gmail dot com
[2016-10-14 08:23 UTC] fashionretailshop01 at gmail dot com
[2016-12-01 14:28 UTC] hranicka at outlook dot com
[2017-02-06 19:39 UTC] langemeijer@php.net
[2017-02-06 19:57 UTC] langemeijer@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: langemeijer
[2017-03-29 02:23 UTC] james at james dot tl
[2017-10-24 06:49 UTC] kalle@php.net
-Status: Assigned
+Status: Feedback
[2017-11-05 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 00:00:01 2025 UTC |
Description: ------------ I've tried to use this plugin on PHP7 (compiling from trunk / master). It compiles and installs. I can connect fine. However it seems the file_exists function no longer reports true when using an ssh2_sftp resource handle. Test script: --------------- <?php if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist"); // log in at server1.example.com on port 22 if(!($con = ssh2_connect("wherever", 22))){ echo "fail: unable to establish connection\n"; } else { // try to authenticate with username root, password secretpassword if(!ssh2_auth_pubkey_file($con, "someuser", "/path/to/.ssh/id_rsa.pub", "/path/to/.ssh/id_rsa")) { echo "fail: unable to authenticate\n"; } else { // allright, we're in! echo "okay: logged in...\n"; // execute a command if (!($stream = ssh2_exec($con, "ls -al" ))) { echo "fail: unable to execute command\n"; } else { echo "what came back from command:\n"; // collect returning data from command stream_set_blocking($stream, true); $data = ""; while ($buf = fread($stream,4096)) { $data .= $buf; } fclose($stream); echo $data; $sftp = ssh2_sftp($con); echo "\n"; $result = file_exists("ssh2.sftp://$sftp/path/to/somefile"); echo "\n"; echo "\n"; echo "\n"; echo "file_exists: " . ($result ? "yes" : "no "); echo "\n"; } } } Expected result: ---------------- .... file_exists: yes Actual result: -------------- .... file_exists: no