博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to build missing PHP 5.3 extensions on CentOS 5.6
阅读量:4312 次
发布时间:2019-06-06

本文共 1430 字,大约阅读时间需要 4 分钟。

I've created a fresh installation of CentOS 5.6, and installed PHP 5.3 using the php53-* packages from the CentOS repository. Specifically, I've got:

  • php53
  • php53-cli
  • php53-common
  • php53-devel
  • php53-mysql
  • php53-pdo
  • php53-xml

However, I also need to install the mcrypt and apc extensions for my application. CentOS has a pre-built php-mcrypt package, but there is no equivalent php53-mcrypt. The installation of APC requires pecl which I would normally install (for 5.1) with the php-pear package, but likewise there doesn't seem to be a php53-pear package.

How do I build these?

 

You can compile and install manually only the mcrypt extension. This is what I did in my CentOS 5.6 VPS:

First install some required packages:

yum install php53-devel libmcrypt-devel gcc gcc-c++

Then download the php 5.3.6 source code from php.net and unpack it:

wget http://mx2.php.net/get/php-5.3.6.tar.bz2/from/us3.php.net/mirrortar xvjf php-5.3.6.tar.bz2

(Please note that the download link will change with every subsequent PHP release.)

Go to the directory with the mcrypt extension source code and compile:

cd php-5.3.6/ext/mcrypt/phpizeaclocal./configuremake

Then install:

make install

Create the configuration file for PHP /etc/php.d/mcrypt.ini containing:

extension=mcrypt.so

Restart apache:

/etc/init.d/httpd restart

Create a file with phpinfo just to check if the extension was loaded:

转载于:https://www.cnblogs.com/cav5lier/p/3198358.html

你可能感兴趣的文章
ControlExtensionTest(二)-----CCControlSlider
查看>>
CentOS 开发环境准备
查看>>
正则表达式在.net中的应用—新手工作笔记
查看>>
5-2 彩色图片直方图
查看>>
02_servlet介绍
查看>>
详解Django的 select_related 和 prefetch_related 函数对 QuerySet 查询的优化
查看>>
svn出现skips remain conficted,不能更新代码问题
查看>>
实验4
查看>>
day 13 内置函数 闭包:
查看>>
Angular——自定义指令
查看>>
SQL Server nested loop join 效率试验
查看>>
pg数据库sql积累
查看>>
python字符串常用函数
查看>>
数据结构
查看>>
列表生成式,生成器表达式,模块
查看>>
Android注解框架实战-ButterKnife(原创)
查看>>
三、回归问题与应用
查看>>
第二届PHP全球开发者大会(含大会的PPT)
查看>>
5.23BOM
查看>>
SVN使用教程
查看>>