Results 1 to 8 of 8

Thread: Unable to get SFTP working in PHP script

  1. #1
    Join Date
    Jan 2016
    Location
    UK
    Posts
    577

    Default Unable to get SFTP working in PHP script

    I need to code a PHP script to do SFTP which requires SSH2 support in PHP. I have libssh2-1 installed but when I try to use the ssh2_connect function I get an error message saying 'undefined function ssh2_connect()'. There are various things I can find about a package called php-ssh2 but nothing seems to exist for openSUSE TW. Does anyone have any ideas as to how I get this working please? I need a fairly vanilla method as this will have to port to a PHP installation on Windows as well and needs to be fairly straight forward.

    Stuart

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,844
    Blog Entries
    14

    Default Re: Unable to get SFTP working in PHP script

    AFAIK this is not part of php itself. Found this page, http://php.net/manual/en/ssh2.installation.php AFAICS the instructions for Centos should work.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,551

    Default Re: Unable to get SFTP working in PHP script

    AFAICS, for the case of openSUSE, the SSH2 libraries for PHP5 are in these repositories: <https://download.opensuse.org/reposi...p:/extensions/>.

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,844
    Blog Entries
    14

    Default Re: Unable to get SFTP working in PHP script

    Quote Originally Posted by dcurtisfra View Post
    AFAICS, for the case of openSUSE, the SSH2 libraries for PHP5 are in these repositories: <https://download.opensuse.org/reposi...p:/extensions/>.
    The OP is on Tw, which has php7.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5
    Join Date
    Jan 2016
    Location
    UK
    Posts
    577

    Default Re: Unable to get SFTP working in PHP script

    The issue with the CENTOS instructions is that they dont come up with a downloadable package. I guess I have to work it out myself for a PHP7.4 package.

    Stuart

  6. #6
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,551

    Question Re: Unable to get SFTP working in PHP script

    Quote Originally Posted by Knurpht View Post
    The OP is on Tw, which has php7.
    A possible Tumbleweed disadvantage?

  7. #7
    Join Date
    Jan 2016
    Location
    UK
    Posts
    577

    Default Re: Unable to get SFTP working in PHP script

    Well I managed to download the required package and install it and now it works.

    Stuart

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,844
    Blog Entries
    14

    Default Re: Unable to get SFTP working in PHP script

    Quote Originally Posted by broadstairs View Post
    Well I managed to download the required package and install it and now it works.

    Stuart
    Yay, awesome. Thanks for reporting back..
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •