CentOS Source code compiled PHP5 mcrypt module steps _linux

Source: Internet
Author: User
Tags mcrypt sqlite

Steps:
1. Download the php5.3.x version of the source code from the php.net;

2.centos install the appropriate expansion pack:

Copy Code code as follows:

Yum install Libmcrypt libmcrypt-devel mcrypt Mhash

The following development environment is to compile the entire PHP source preparation environment, this compilation MCrypt extension does not need to execute.

Copy Code code as follows:

Yum install-y httpd-devel Libtool-ltdl libtool-ltdl-devel openssl-devel \
Libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel \
Libc-client libc-client-devel gd gd-devel libmcrypt libmcrypt-devel \
SQLite sqlite-devel mysql-devel Libicu libicu-devel pcre-devel

3. Determine if Phpize is installed to the server:
Whereis phpize

Determine the location of the Php-config:
Whereis Php-config
Perform:
./configure–with-php-config=/usr/bin/php-config
4.make Error:
Mcrypt.c:283:error: ' Php_fe_end ' undeclared here (no in a function)
Workaround:

Copy Code code as follows:

Sed-i ' s| php_fe_end| {null,null,null}| ' ./ext/**/*.c
Make

If it is a zend_mod_end error, execute:

Copy Code code as follows:

Sed-i ' s| zend_mod_end| {null,null,null}| ' ./ext/**/*.c

5. Perform the next make test and the tests are fine. Re-execution:

Copy Code code as follows:

Make install

6. Additional Documents:/etc/php.d/mcrypt.ini
Copy Code code as follows:

; Enable mbstring Extension Module
Extension=mcrypt.so

7. Restart the Web server to check that the PHP MCrypt is installed successfully.

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.