No need to recompile PHP to join the FTP extension workaround this article introduces the method that does not need to recompile the PHP to join the FTP extension, the need friend can refer to the next
First, enter the source directory
CD php-5.2.13/ext/ftp
#运行phpize生成configure
/usr/local/php/bin/phpize
#编译, designate Php-config, note the php-config here, not php.ini
./configure--with-php-config=/usr/local/php/bin/php-config
#上面可以添加--enable-ftp, or you can not add
#编译安装
Make;make Install
#生成一个目录来存放扩展的模块
Mkdir/usr/local/php/etc/php/ext
#复制ftp. So to the module directory
cp/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/ftp.so/usr/local/php/etc/ext/
#编辑php. ini file, specify which directory read module PHP to
Vi/usr/local/php/etc/php.ini
Copy CodeThe code is as follows:
Extension_dir= "/usr/local/php/etc/ext"
#Load模块
Extension=ftp.so
#保存退出
This completes the loading of the FTP extension successfully.
No need to recompile PHP to join the FTP extension workaround