Resolve CentOS 6.5 x64 compile PHP error

Source: Internet
Author: User
Tags imap php error centos vps

PHP official update is very diligent. A few days to see, and updated. So upgrade the VPS PHP chant. The compiler ran running with the following error:cc:internal error:killed (program CC1)
obviously this is a compilation process that was killed by the system, and I've encountered this many times when I tested the lamp one-click installation script. The reason is that memory is too small to cause. Today, this error occurs when compiling a 256MB-Ram VPS. Usually, in the x64 system small memory VPS is more common.

This was also the case when testing on the Aliyun 512MB VPS. The solution is to configure add an option –disable-fileinfo while compiling PHP, while shutting down some running processes such as mysqld,httpd and so on to save memory.
There is to increase the swap partition (if the VPS does not exist in the case of swap, such as Digitalocean default does not have a swap), can also help solve the problem of small memory compilation. How to add a swap partition to a digitalocean system see: http://www.111cn.net/sys/CentOS/56848.htm

Through the steps above, I successfully compile PHP on the 256MB buyvm VPS.

Attach my complete compile PHP configure option (see: Lamp One-click installation script) for more details:

The code is as follows Copy Code

./configure--prefix=/usr/ local/php--with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc--with-mysqli= /usr/local/mysql/bin/mysql_config--with-pdo-mysql--with-mysql-sock=/usr/local/mysql/mysql.sock-- WITH-CONFIG-FILE-SCAN-DIR=/USR/LOCAL/PHP/PHP.D--with-openssl--with-zlib--with-curl--enable-ftp--WITH-GD-- With-jpeg-dir--with-png-dir--with-freetype-dir--with-xmlrpc--enable-calendar--with-imap-- With-imap-ssl--with-ldap--enable-bcmath--enable-exif--enable-wddx--enable-tokenizer-- Enable-sockets--enable-ctype--enable-gd-native-ttf--enable-mbstring--enable-intl--enable-xml-- Enable-json--enable-session--enable-soap--with-mcrypt--enable-zip--with-iconv=/usr/local/libiconv /usr/local/mysql--with-icu-dir=/usr--with-mhash=/usr--with-pcre-dir--without-pear--disable-fileinfo

 

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.