phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块,下面介绍一个它的使用方法,需要的朋友可以参考下

安装(fastcgi模式)的时候,常常有这样一句命令:

代码如下:

/usr/local/webserver/php/bin/phpize

一、phpize是干嘛的?

phpize是什么?

phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块

比如你想在原来编译好的php中加入memcached或者ImageMagick等扩展模块,可以使用phpize,通过以下几步工作。

二、如何使用phpize?

当php编译完成后,php的bin目录下会有phpize这个脚本文件。在编译你要添加的扩展模块之前,执行以下phpize就可以了;

比如现在想在php中加入memcache扩展模块:我们要做的只是如下几步

代码如下:

tar zxvf memcache-2.2.5.tgz

cd memcache-2.2.5/

/usr/local/webserver/php/bin/phpize

./configure –with-php-config=/usr/local/webserver/php/bin/php-config

make

make install

注意./configure 后面可以指定的是php-config文件的路径

这样编译就完成了,还需要做的是在php.ini文件中加入extension值

代码如下:

extension = “memcache.so”

注意:Cannot find config.m4.

这个错误是一个很傻的错误,解压以后需要cd到文件夹,不然phpize就会报错

动态编译PHP的memcache扩展库,在执行/usr/localphp/bin/phpize时出现了错误,

代码如下:

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script.

很明显缺少文件,需要安装。

代码如下:

# 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 && 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 && make install

然后执行以下命令进行安装

#/usr/local/php/bin/phpize

#./configure –prefix=/usr/local/memcached –with-libevent=/usr/local/libevent –with-php-config=/usr/local/php/bin/php-config

#make && make install

phpize使用方法的更多相关文章

  1. LINUX下用PHPIZE安装PHP GD扩展

    环境:LNMP in centOS 6.4. linux下PHP的扩展可以用phpize的方法,比较简单地进行启用. 以下以PHP-GD2 库安装为例子. sudo yum install php-g ...

  2. ubuntu下完全安装mcrypt

    源文章: ubuntu下安装mcrypt 1.首先要下载三个软件 0libmcrypt-2.5.8.tar.gz 下载地址:http://sourceforge.net/project/showfil ...

  3. linux gd库不支持jpeg解决办法

    1. 查看gd库是否支持jpeg gd_info(); 2. 如果JPEG Support 不为1则不支持. 3.首先下载 libjpeg http://www.ijg.org/ ,进行安装 安装目录 ...

  4. Memcached安装使用教程及常见问题

    一.Windows下安装memcahed 1.下载memcache的windows稳定版,解压放某个盘下面,比如在c:/memcached2.在终端(也即cmd命令界面)下输入"c:/mem ...

  5. apache服务器yii2报The fileinfo PHP extension is not installed解决思路

    这个问题整整困扰了我两天,今天终于搞定了.记录一下. 背景是这样的,我呢,在centos服务器上安装了lamp环境,其中php是5.3.3,在用composer安装yii2的时候,出现了某些yii2插 ...

  6. javaSE27天复习总结

    JAVA学习总结    2 第一天    2 1:计算机概述(了解)    2 (1)计算机    2 (2)计算机硬件    2 (3)计算机软件    2 (4)软件开发(理解)    2 (5) ...

  7. macOS 中使用 phpize 动态添加 PHP 扩展的错误解决方法

    使用 phpize 动态添加 PHP 扩展是开发中经常需要做的事情,但是在 macOS 中,首次使用该功能必然会碰到一些错误,本文列出了这些错误的解决方法. 问题一: 执行 phpize 报错如下: ...

  8. phpize命令在安装AMQP插件是报错phpize:Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF envir的解决方法

    phpize命令在安装AMQP插件是报错phpize:Cannot find autoconf. Please check your autoconf installation and the $PH ...

  9. 安装openssl 扩展的时候出现Cannot find config.m4. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module的解决方法

    进入php源码包目录:cd /usr/local/php-5.6.25/ext/openssl 执行命令:  cp ./config0.m4 ./config.m4 即可

随机推荐

  1. swift-get-nodes简单使用

    在参考http://blog.csdn.net/cywosp/article/details/12850645文章对对象的具体物理磁盘位置进行查找时,发现两个问题: 1. 在使用swift+keyst ...

  2. 使用tftp给ARM下载程序

    使用tftp给ARM下载程序 1.开发板和主机能够ping的通 前提:要把计算机的防火墙关了,不然就会出现下面这种情况 如果电脑连接的无线网,那么设置本地连接的ip设置为固定ip.Ip地址和开发的ip ...

  3. Windows X64平台搭建Java开发环境

       JDK下载路径:www.oracle.com/technetwork/java/javase/downloads/index.html 下载JDK(Java Develop Kit) (1)针对 ...

  4. idea2016 64位 安装,jdk环境变量配置

      idea 激活服务器地址: 地址1: http://www.iteblog.com/idea/key.php     地址2:  http://idea.qinxi1992.cn/ intelli ...

  5. 错误:Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web

    在eclipse的workspace里面找到该项目. 依次进入:.settings->org.eclipse.wst.common.project.facet.core.xml. 打开文件后,将 ...

  6. Angular14 Visual Studio Code作为Angular开发工具常用插件安装、json-server安装与使用、angular/cli安装失败问题、emmet安装

    前提准备: 搭建好Angular开发环境 1 安装Visual Studio Code 教程简单,不会的去问度娘 2 安装Chrome浏览器 教程简单,不会的趣闻度娘 3 Visual Studio ...

  7. Maven Cargo 远程部署到tomcat7x

    pom.xml中加入cargo的Plugin声明: <plugin> <groupId>org.codehaus.cargo</groupId> <artif ...

  8. isPCR安装

    isPCR是用一对PCR引物搜索序列数据库.它使用索引策略来快速完成此操作.当搜索成功时,输出是fasta格式序列文件,其包含数据库中位于引物对之间的所有区域. Linux系统下安装 1. 使用二进制 ...

  9. 经典DP 嵌套矩形 (南洋理工ACM—16)

    本来是个很水的DP,结果被自己的代码习惯给打败了 代码: #include<iostream> #include<stdlib.h> #include<string.h& ...

  10. 自签名配置HTTPS

    基于AFN3.0 1.将后台提供的.cer文件文件保存至本地 2.在封装的网络请求工具类中为AFN的AFSecurityPolicy属性赋值 -(AFSecurityPolicy *)customSe ...