在OS X系统中php访问sftp时需要ssh2扩展的安装
andy@AndyMacBookPro:/usr/local/src$ php -v
PHP 5.4.40 (cli) (built: May 3 2015 22:07:42)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
andy@AndyMacBookPro:/usr/local/src$ brew search ssh2
libssh2 php53-ssh2 php54-ssh2 php55-ssh2 php56-ssh2
^C^C^C
/usr/local/Library/brew.rb: Interrupt
andy@AndyMacBookPro:/usr/local/src$ brew install php54-ssh2
==> Installing dependencies for php54-ssh2: libpng, gettext, icu4c, php54
==> Installing php54-ssh2 dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.
######################################################################## 100.0%
==> Pouring libpng-1.6.13.mavericks.bottle.tar.gz
? /usr/local/Cellar/libpng/1.6.13: 17 files, 1.2M
==> Installing php54-ssh2 dependency: gettext
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.1
######################################################################## 100.0%
==> Pouring gettext-0.19.2.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.
OS X provides the BSD gettext library and some software gets confused if both are in the library path.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
==> Summary
? /usr/local/Cellar/gettext/0.19.2: 1920 files, 18M
==> Installing php54-ssh2 dependency: icu4c
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/icu4c-53.1.
######################################################################## 100.0%
==> Pouring icu4c-53.1.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Conflicts; see: https://github.com/Homebrew/homebrew/issues/issue/167
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
==> Summary
? /usr/local/Cellar/icu4c/53.1: 241 files, 57M
==> Installing php54-ssh2 dependency: php54
==> Downloading http://www.php.net/get/php-5.4.32.tar.bz2/from/this/mirror
######################################################################## 100.0%
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.32 --localstatedir=/usr/loc
==> make
==> make install
==> /usr/local/Cellar/php54/5.4.32/bin/pear config-set php_ini /usr/local/etc/ph
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/opt/php54/libexec/apache2/libphp5.so
The php.ini file can be found in:
/usr/local/etc/php/5.4/php.ini
???? PEAR ????
If PEAR complains about permissions, 'fix' the default PEAR permissions and config:
chmod -R ug+w /usr/local/Cellar/php54/5.4.32/lib/php
pear config-set php_ini /usr/local/etc/php/5.4/php.ini
???? Extensions ????
If you are having issues with custom extension compiling, ensure that
you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PATH="/usr/local/bin:$PATH"
PHP54 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.
???? PHP CLI ????
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,
~/.zshrc, ~/.profile or your shell's equivalent configuration file:
export PATH="$(brew --prefix homebrew/php/php54)/bin:$PATH"
To have launchd start php54 at login:
ln -sfv /usr/local/opt/php54/*.plist ~/Library/LaunchAgents
Then to load php54 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php54.plist
==> Summary
? /usr/local/Cellar/php54/5.4.32: 489 files, 38M, built in 7.6 minutes
==> Installing php54-ssh2 dependency: libssh2
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libssh2-1.4
######################################################################## 100.0%
==> Pouring libssh2-1.4.3_1.mavericks.bottle.tar.gz
? /usr/local/Cellar/libssh2/1.4.3_1: 177 files, 1.3M
==> Installing php54-ssh2
==> Downloading http://pecl.php.net/get/ssh2-0.12.tgz
######################################################################## 100.0%
==> PHP_AUTOC/usr/local/opt/autoconf/bin/autoconf" PHP_AUTOHEADER="/usr/loc
==> ./configure --prefix=/usr/local/Cellar/php54-ssh2/0.12 --with-php-c>==> make
==> Caveats
To finish installing ssh2 for PHP 5.4:
* /usr/local/etc/php/5.4/conf.d/ext-ssh2.ini was created,
do not forget to remove it upon extension removal.
* Validate installation via one of the following methods:
*
* Using PHP from a webserver:
* - Restart your webserver.
* - Write a PHP page that calls "phpinfo();"
* - Load it in a browser and look for the info on the ssh2 module.
* - If you see it, you have been successful!
*
* Using PHP from the command line:
* - Run "php -i" (command-line "phpinfo()")
* - Look for the info on the ssh2 module.
* - If you see it, you have been successful!
==> Summary
? /usr/local/Cellar/php54-ssh2/0.12: 3 files, 72K, built in 10 seconds
andy@AndyMacBookPro:/usr/local/src$
版权声明:本文为博主原创文章,未经博主允许不得转载。
以上就介绍了在OS X系统中php访问sftp时需要ssh2扩展的安装,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

AI Hentai Generator
Menjana ai hentai secara percuma.

Artikel Panas

Alat panas

Notepad++7.3.1
Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1
Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6
Alat pembangunan web visual

SublimeText3 versi Mac
Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Topik panas



PHP 8.4 membawa beberapa ciri baharu, peningkatan keselamatan dan peningkatan prestasi dengan jumlah penamatan dan penyingkiran ciri yang sihat. Panduan ini menerangkan cara memasang PHP 8.4 atau naik taraf kepada PHP 8.4 pada Ubuntu, Debian, atau terbitan mereka

Bekerja dengan pangkalan data dalam CakePHP adalah sangat mudah. Kami akan memahami operasi CRUD (Buat, Baca, Kemas Kini, Padam) dalam bab ini.

Untuk bekerja dengan tarikh dan masa dalam cakephp4, kami akan menggunakan kelas FrozenTime yang tersedia.

Untuk mengusahakan muat naik fail, kami akan menggunakan pembantu borang. Di sini, adalah contoh untuk muat naik fail.

CakePHP ialah rangka kerja sumber terbuka untuk PHP. Ia bertujuan untuk menjadikan pembangunan, penggunaan dan penyelenggaraan aplikasi lebih mudah. CakePHP adalah berdasarkan seni bina seperti MVC yang berkuasa dan mudah difahami. Model, Pandangan dan Pengawal gu

Pengesah boleh dibuat dengan menambah dua baris berikut dalam pengawal.

Log masuk CakePHP adalah tugas yang sangat mudah. Anda hanya perlu menggunakan satu fungsi. Anda boleh log ralat, pengecualian, aktiviti pengguna, tindakan yang diambil oleh pengguna, untuk sebarang proses latar belakang seperti cronjob. Mengelog data dalam CakePHP adalah mudah. Fungsi log() disediakan

Kod Visual Studio, juga dikenali sebagai Kod VS, ialah editor kod sumber percuma — atau persekitaran pembangunan bersepadu (IDE) — tersedia untuk semua sistem pengendalian utama. Dengan koleksi sambungan yang besar untuk banyak bahasa pengaturcaraan, Kod VS boleh menjadi c
