Php5.4.34+opcache environment integration of multi-pressure measurement environment

Source: Internet
Author: User
Tags phpinfo

The company is doing high-concurrency pressure measurement,Fastcgi,apc,ocache,opcache,

After several considerations , the final consideration is to use Opcache, because as the Zend-opcache merged into the branch version of php5.5, the future of XCache is worrying,

In the installation of the environment unexpectedly toss half the afternoon did not fix, this make a problem record.

first say install ,

http://php.net/manual/zh/opcache.installation.php

Official website Description , because 5.2 5,3 5,4 can also use pecl to install , tried the next installation is successful but also no error after startup , but info information is not together , the installation process is as follows :

sudo yum install Php54w-pecl-zendopcache

sudo pecl install zendopcache-7.0.3

; extension=opcache.so

Extension=/usr/lib64/php/modules/opcache.so

;

opcache.memory_consumption=128

Opcache.interned_strings_buffer=8

opcache.max_accelerated_files=4000

Opcache.revalidate_freq=60

Opcache.fast_shutdown=1

Opcache.enable_cli=1

sudo service php-fpm restart

But after the start has been error 502,fastcgi log also only warning error

WARNING: [Pool www] child 30464 exited onsignal one (SIGSEGV) after 22.168325 seconds from start

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/58/7A/wKiom1SyWZfjkZ_pAANRtvuSDmk011.jpg "style=" float: none; "title=" Php-fpm-error.png "alt=" Wkiom1sywzfjkz_paanrtvusdmk011.jpg "/>


a bit can not find the idea , after some inspection did not find any problem , so decided to manually compile the Opcache module to see,

Intermediate installation of the process there is an installation package prompts upgrade Php-common, thoughts did not better , unexpectedly put php5.4 to uninstall !! Simple 2 home ~ ~ ~ but also for this reason only found the problem,

# Reload the PHP environment is no longer the case, just reload my environment by the original source of the upgrade PHP from the former php5.4.34 into the 5.4.36.

# sudo wget http://pecl.php.net/get/zendopcache-7.0.3.tgz

# sudo tar–xv zendopcache-7.0.3.tgz

# sudo CD zendopcache-7.0.3

# sudo phpize

# sudo./configure--with-php-config=/usr/bin/php-config

# sudo make

# sudo make install

#sudo sudo service php-fpm restart

Here are the changes : read the README

zend_extension=/usr/lib64/php/modules/opcache.so #It was written here.ExtensionbecauseOpcaheis byZendManagement, so~~~,Chinese blog Kills people.the whole of the countryITthe industry still seems to be too impetuous,have to say~// This is a lengthy experience, in order to speed you can find Chinese blog (here is also suggested that the personal blog or original blog , 51cto ,csdn ,Oschina after big bo stall big , the quality really dropped a lot), But for the quality of everyone to find English documents or official website . Since the beginning of the profession, The Chinese blog is also a lot of the pit is not shallow .

opcache.memory_consumption=128

Opcache.interned_strings_buffer=8

opcache.max_accelerated_files=4000

Opcache.revalidate_freq=60

Opcache.fast_shutdown=1

Opcache.enable_cli=1

MEMCACHED.USE_SASL = 1


Here are the warning messages:

[Eaccelerator] This build of "Eaccelerator" is compiled for PHP version 5.4.34. Rebuild it for your PHP version (5.4.36) or download precompiled binaries.

Check the next eaccelerator and opcache implementation of similar functions , but the principle is different , considering here php.ini will Eaccelerator Related configuration All comments , and then restart PHP-FPM

$ sudo service php-fpm restart

Long - lost success,

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/58/77/wKioL1SyWl6hbTwHAABwmrgfbns838.jpg "style=" float: none; "title=" Success.png "alt=" Wkiol1sywl6hbtwhaabwmrgfbns838.jpg "/>

# php–v # # # also shows normal

PHP 5.4.36 (CLI) (Built:dec 20 201414:09:43)

Copyright (c) 1997-2014 the PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2014zend Technologies

With Zendopcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/7A/wKiom1SyWZeS_beOAAEEdkfvL3E307.jpg "style=" float: none; "title=" Remark.png "alt=" Wkiom1sywzes_beoaaeedkfvl3e307.jpg "/>

The phpinfo () page is finally showing up.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/58/77/wKioL1SyWl7w1vuiAAE691UpRz4676.jpg "style=" float: none; "title=" Phpinfo "alt=" Wkiol1sywl7w1vuiaae691uprz4676.jpg "/>

The problem is solved , but it is very regrettable because the relationship between time did not find the source of the problem ...

to provide you with some php5.4. technical problems , but also to provide you with some tips on how to search the Internet.

~~~~~~~~~~~~~~~~~~ had to spit out the format of the document to upload the mess, the experience is very poor, do not know whether this block 51 plan to transform ~


This article is from the "Linux" blog, so be sure to keep this source http://fengzhilinux.blog.51cto.com/1343279/1602188

Php5.4.34+opcache environment integration of multi-pressure measurement environment

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.