Add ftp extension for php under nginx + php

Source: Internet
Author: User
In the linux + nginx + php + mysql environment, you forgot to add the ftp extension of php during deployment. 1, find the original source package decompress a bit such as: php-5.3.6 into the FTP extension directory #/root/php-5.3.6/ext/ftp (by your own software path) 2. call the phpize program to generate the compilation...

In the linux + nginx + php + mysql environment, you forgot to add the ftp extension of php during deployment.
 
1. find the original source code package and decompress it.
Such as: php-5.3.6
Go to the extended directory to FTP #/root/php-5.3.6/ext/ftp (by your own software path)

2. call the phpize program to generate the compilation configuration file.
[Root @ zj ftp] #/usr/local/php/bin/phpize

3. Compile the extension library and execute the following configure and make Commands respectively.

#./Configure -- with-php-config =/usr/local/php/bin/php-config

# After The configure step is passed, run the make command.
# Make

After make is successfully executed, the generated extension library file is in the modules subdirectory of the current directory,

[Root @ zj ftp] # cd modules/
[Root @ zj modules] # ls
Ftp. la ftp. so

4. edit the php. ini file, find the extension_dir directory, and copy the compiled extension file to the extension directory.
Find row 491st and see extension_dir = "// usr/local/php/lib/php/extensions /"

[Root @ zj modules] # cp ftp. so/usr/local/php/lib/php/extension

5. add the extension Library location in php. ini and set the extension library to be added.
Add extension = "ftp. so" at Section 612"

6. restart the php-fpm service.
If you cannot restart the fpm service normally
# Killall php-fpm
Then execute
#/Usr/local/php/sbin/php-fpm


This article is from the "go there" blog

Related Article

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.