Home >Backend Development >PHP Tutorial >Solution to add ftp extension without recompiling php_PHP Tutorial

Solution to add ftp extension without recompiling php_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:12:47845browse

First, enter the source code directory
cd php-5.2.13/ext/ftp

#Run phpize to generate configure
/usr/local/php/bin/phpize

#Compile, specify php-config, note that php-config here is not php.ini
./configure --with-php-config=/usr/local/php/bin/php-config
# You can add --enable-ftp above, or you don’t need to add it

#Compile and install
make;make install

#Generate a directory to store extended modules
mkdir /usr/local/php/etc/php/ext

#Copy 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/

#Edit the php.ini file and specify the directory to which PHP reads the module
vi /usr/local/php/etc/php.ini

Copy code The code is as follows:

extension_dir="/usr/local/php/etc/ext"
# Load module
extension=ftp.so

#Save and exit

At this point, the loading of the ftp extension is successfully completed.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326635.htmlTechArticleFirst, enter the source code directory cd php-5.2.13/ext/ftp #Run phpize to generate configure /usr/local /php/bin/phpize #Compile, specify php-config, note that php-config here is not php.ini ./configur...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn