A magical PHP framework: Phalcon's compiled installation

Source: Internet
Author: User
Tags php framework

Objective

CentOS7 upgrade PHP to the latest version as well as compile and install the Phalcon framework, see the relevant documents countless times, you try to compile the installation before you understand the deeper, compile steps and encountered problems to make a simple record

php-7.0.11 Compiling and installing

1. Download php-7.0.11 Source code

http://php.net/downloads.php#v7.0.11

2. Dependency Development Package

Yum install gcc gcc-c++ libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib- Devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel Curl Curl-devel OpenSSL openssl-devel

3. Compiling the installation

$YOUR _php_src_dir/configure--prefix=/usr/local/php-7.0.11--with-config-file-path=/usr/local/php-7.0.11/etc-- ENABLE-FPM--with-pdo-mysql=mysqlnd--enable-mysqlnd--with-mysqli=mysqlnd--with-openssl--with-mcrypt--WITH-GD-- WITH-FREETYPE-DIR=/USR--with-jpeg-dir=/usr--with-png-dir=/usr--enable-exif--enable-mbstring--enable-pcntl-- With-curl--enable-sockets--enable-soap--enable-ftp--with-zlib--enable-zip--with-bz2

Phalcon Compiling and installing

1. Download the latest Phalcon source code

git clone git://github.com/phalcon/cphalcon.git

2. Compiling the installation

CD Cphalcon/build
./install

3. Plus configuration (php.ini)

Extension=phalcon.so

4. Restart PHP-FPM

Service PHP-FPM Restart

Problem

1.GCC Compiler error (Insufficient memory)

cc:internal compiler error:killed (program CC1)
Please submit a full bug report,
With preprocessed source if appropriate.
See Make: * * * [Phalcon.lo] Error 1

Postscript

1. Using the advanced compilation method in the Phalcon document, the compiled file will be very large, nearly 20 megabytes
2. Use the general compilation method in the Phalcon document, only about 5 m after compiling the file
3. Using the generic compilation method, the command auto-search path needs to be displayed specifying the path of the 2 commands required to compile PHP version php-config,phpize
The 4.cphalcon/build/install installation script is automatically compiled according to the system environment and the installed PHP version
5. Compilation time is longer >_<
6. Compile with sufficient memory to be available >=2g
7. When compiling PHP, the official recommendation is to use the MYSQLND driver

Resources

"1" Phalcon Warehouse
Https://github.com/phalcon/cphalcon
"2" gcc:internal error:killed (program cc1) while compiling PHP
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48796

A magical PHP framework: Phalcon's compiled installation

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.