1

I'm trying to use ssh2_sftp($connection) but if i assign variable like that

$sftp = ssh2_sftp($connection)

My serveur return error 503

But if i do print_r(ssh2_sftp($connection)) i've ressource :

Resource id #137

The problem is for the rest of the code i can't do that :

$stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r');

laurent
  • 67
  • 6
  • Did you find a solution? I am facing exactly the same behavior, the strange thing is that if I fopen the file on "w" mode the file is created(if it does not exist) but still I get a 503 error. I even try the "intval($sftp)" solution than I found on similar posts but still nothing. – Octavio Soto Sep 16 '20 at 00:27

0 Answers0