Php does not recompile add ftp module to add ftp module as an example to enter the source directory cdphp-5.2.9extftp # run phpize to generate configureusrlocalphp529binphpize? Configuringfor: PHPApiVersion :???????? 20041225 ZendModuleApiNo :? Php does not recompile to add the ftp module
Example of adding an ftp module
Go to the source code directory
Cd php-5.2.9/ext/ftp
# Run phpize to generate configure
/Usr/local/php529/bin/phpize
?
Processing ING:
PHP Api Version :???????? 20041225
Zend Module Api No :????? 20060613
Zend Extension Api No :?? 220060519
If
Cannot findAutoconf. Please check your autoconf installation and?$ PHP_AUTOCONF?Environment variable is set correctly and then rerun this script.
?
Install the following two packages
?
# Wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# Tar-zvxf m4-1.4.9.tar.gz
# Cd m4-1.4.9/
#./Configure & make install
# Cd ../
# Wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# Tar-zvxf autoconf-2.62.tar.gz
# Cd autoconf-2.62/
#./Configure & make install
?
Then start configuring
# Compile and specify php-config. Note that the php-config here is not php. ini.
./Configure -- with-php-config =/usr/local/php529/bin/php-config
# You can add -- enable-ftp or not.
# Compile and install
Make & make install
Cd modules/
Ls
Ftp. la ftp. so
# Copy ftp. so to the module directory
Cp ftp. so/usr/local/php529/lib/php/extensions
?
# Edit the php. ini file to specify the directory to which PHP is read.
Vi/usr/local/php529/etc/php. ini
Extension_dir = "/usr/local/php5/lib/php/extensions"
# Load module
Extension = ftp. so
# Save and exit
Restart apache
Use/usr/local/php/bin/php-m | grep ftp to check whether ftp. so exists.