468,771 Members | 1,784 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,771 developers. It's quick & easy.


Hello friends of php,

PhP-Version is 4 on a FreeBSD-System using apache.

Got a problem using ssh2.sftp.

Installed correctly (libssh2, ssh2.so-module).

Connecting with publickey works, sftp subsystem-connect works too:

$sshconn= ssh2_connect ('myhostname',22);

$result = ssh2_auth_pubkey_file ($sshconn, 'user',
'include/.ssh/id_rsa.pub', 'include/.ssh/id_rsa' );

$sftp = ssh2_sftp($sshconn);

sftp-subsystem itself is working, the following works too:

ssh2_sftp_mkdir($sftp, '/home/meee/NEWDIR1');

but if I start using the ssh2.sftp-things is wont get any further:


in szenario I get a

Warning: mkdir(ssh2.sftp:///home/meee/NEWDIR2): No such file or
directory in.

Also fopen will not work and wont produce an error.

Has anyone working this?

I also tried any combinations of

fopen ("ssh2.sftp://$sftp/home/meee/testfile",'rb');

with $sftp:22 , user:pass@hostname:22 and these things.

Will it work with php5? I have no Testsystem for this
at the moment and dont want to install one if there is
no hope.

Thanks in advance


Bernhard Guenther, Bonn, Germany
Jan 10 '06 #1
0 4364

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by gonchi | last post: by
reply views Thread by adamsbarker | last post: by
4 posts views Thread by Luke Vogel | last post: by
4 posts views Thread by sa6113 | last post: by
7 posts views Thread by K Viltersten | last post: by
2 posts views Thread by sivashanmugam | last post: by
1 post views Thread by ndedhia1 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.