Php does not add the ftp module to the new compilation

Source: Internet
Author: User
Php does not recompile add ftp module to add ftp module as an example to enter the source directory cdphp-5.2.9/ext/ftp # run phpize to generate configure/usr/local/php529/bin/phpize? Configuringfor: PHP 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.