PHP添加新模块
来源:互联网 发布:UC数据库设计 编辑:程序博客网 时间:2024/04/30 16:27
一个PHP项目需要添加ftp的模块,需要添加。 解决备注:
1
centos 6.5
PHP 5.3.28
iptable selinux 全部关闭
2
PHP简单安装
yum install -y libxml2 libxml2-devel libcurl libcurl-devel gd gd-devel
tar -zxvf php-5.3.28.tar.gzcd php-5.3.28'./configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv=/usr/local' '--with-freetype-dir' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-libxml-dir=/usr' '--enable-xml' '--disable-rpath' '--enable-safe-mode' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-inline-optimization' '--with-curl' '--with-curlwrappers' '--enable-mbregex' '--enable-fpm' '--enable-mbstring' '--with-mcrypt' '--with-gd' '--enable-gd-native-ttf' '--with-openssl' '--with-mhash' '--with-gettext' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-zip' '--enable-soap'makemake install
这里面有一个技巧:make -j4 表示4个处理器一起进行编译 这样速度会快很多。
查看安装模块
[root@cyf bin]# ./php -m[PHP Modules]bcmathCorectypecurldatedomeregfileinfofiltergdgettexthashiconvjsonlibxmlmbstringmcryptmhashmysqlmysqlimysqlndopensslpcntlpcrePDOpdo_mysqlpdo_sqlitePharposixReflectionsessionshmopSimpleXMLsoapsocketsSPLSQLitesqlite3standardsysvsemtokenizerxmlxmlreaderxmlrpcxmlwriterzipzlib[Zend Modules]
没有ftp的模块
添加模块:
[root@cyf bin]# find /root/php-5.3.28 -name ftp/root/php-5.3.28/ext/ftp[root@cyf ftp]# cd /root/php-5.3.28/ext/ftp/[root@cyf ftp]# lsconfig.m4 config.w32 CREDITS ftp.c ftp.h package.xml php_ftp.c php_ftp.h tests[root@cyf ftp]# /usr/local/php/bin/phpize Configuring for:PHP Api Version: 20090626Zend Module Api No: 20090626Zend Extension Api No: 220090626[root@cyf ftp]# ./configure --with-php-config=/usr/local/php/bin/php-config [root@cyf ftp]# make && make install[root@cyf php-5.3.28]# cp php.ini-development /usr/local/php/etc/php-ini[root@cyf php-5.3.28]# pwd/root/php-5.3.28[root@cyf ~]# extension=ftp.so >> /usr/local/php/etc/php—ini[root@cyf php]# pkill php[root@cyf php]# ps -ef | grep phproot 44786 1689 0 13:25 pts/0 00:00:00 grep php[root@cyf php]# cd sbin[root@cyf sbin]# ./php-fpm [root@cyf sbin]# [root@cyf sbin]# /usr/local/php/bin/php -m[PHP Modules]bcmathCorectypecurldatedomeregfileinfofilterftpgdgettexthashiconvjsonlibxmlmbstringmcryptmhashmysqlmysqlimysqlndopensslpcntlpcrePDOpdo_mysqlpdo_sqlitePharposixReflectionsessionshmopSimpleXMLsoapsocketsSPLSQLitesqlite3standardsysvsemtokenizerxmlxmlreaderxmlrpcxmlwriterzipzlib[Zend Modules]
看PHP已经加入ftp。
0 0
- PHP添加新模块
- Nginx添加新模块
- php添加模块
- php添加扩展模块
- php 添加curl 模块
- apache添加php模块
- php添加openssl模块
- 03_Nginx添加新模块
- ffmpeg-添加新模块分析
- nginx新添加lua模块
- PHP Yii开源框架入门学习(四)添加新模块
- php安装新模块(phpize)
- PHP编译加载新模块
- 为 PHP 添加 CURL 模块
- 为PHP添加MEMCACHE模块
- 独立添加PHP扩展模块
- PHP添加uuid()模块支持
- 动态添加php扩展模块
- android 改变app亮度不影响系统亮度(获取系统亮度)
- Android ORM 框架——greenDAO
- Linux 调优方案
- 最大连续子序列和
- Jmeter基础(一)---元件作用域与执行顺序
- PHP添加新模块
- 安卓登录界面让输入框滚动到指定位置的方法
- 文章标题
- nodejs meanjs meanio yo等
- Digogo ugdx文件的制作
- Spring 中数据源和数据库连接池配置的几种方法
- 白平衡算法---色温曲线
- 安卓保存图片到相册
- go语言scan空值报错