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