Application environmentLNMP environment, the current PHP version 5.3.8, encountered an application need only support PHP 5.2.x, but also want to keep existing applications or PHP 5.3.8. This means that two versions of PHP are required to be present
The previous blog post describes how to build a lamp in the way of compiling, here I am no longer one by one description, I here in detail about PHP in the way of FPM work:If you want to let the compiled PHP support MCrypt extension, here in
The support for Curl in CentOS 6.2 system is NSS version, not OpenSSL, so when PHP uses curl to access HTTPS, it will report unable to load client key-8178 error, in Google Group inside found inspiration, is also curl and HTTPS, inside said is curl
Mb_convert_encoding is used to convert the encoding. I have never understood the concept of program encoding, but now it seems a bit open. However, the English language generally does not have Encoding Problems. Only Chinese data can have this
Use the iconv function:
Iconv ("UTF-8", "gb2312", "abc sunshine 123 ");
It is said that this is better, you can ignore the conversion error!
Iconv ("UTF-8", "gb2312 // ignore", "abc sunshine 123 ");
For the usage of mb_convert_encoding,
The first step is to download tzr.gz PHP source Package FirstThen tar zxvf php-5.4.11.tar.gzThen CD php-5.4.11Then copy the following compilation code./configure \--prefix=/usr/local/php \--enable-zip \--with-xsl \--enable-zend-multibyte
Download the php5.6.9 package and unzip it
[Email protected] ~]# wget http://cn2.php.net/distributions/php-5.6.9.tar.bz2[Email protected] ~]# Tar XF php-5.6.9.tar.bz2
Compiling the installation
My compilation options are as
PHP installation depends on the MySQL environment, before installation, you need to check whether MySQL installationI. EnvironmentSystem: CentOS 6.4x64 Minimized installationip:192.168.3.54Second, installationCheck the system environment before
This article was sponsored by Xiuyi linfeng and first launched in the dark world. Currently, only php has no source code installed. This article will introduce this article. Note the centos6.564bit used in this article. Log on to centos to download
Compile and install php 5.4.11
Step 1 first download the tzr.gz php source packageThen tar zxvf php-5.4.11.tar.gzThen cd php-5.4.11Then copy the following compilation code./Configure \-- Prefix =/usr/local/php \-- Enable-zip \-- With-xsl \--
Php-FPM configuration in nginx tutorialNginx can directly call FPM to drive php and then discard apache. Let's not talk about the reason.First download the php5.4 installation package.According to others The code is as follows:Copy code .
String iconv (string in_charset, string out_charset, string str)Note: in addition to specifying the encoding to be converted, you can also add two suffixes: // transcoder and // IGNORE, // Transcoder automatically converts a character that cannot be
1. Install the PHP dependency Library The code is as follows:Copy code # Install libmcryptCd/usr/local/src/php-lib/libmcrypt-2.5.8./Configure -- prefix =/usrMake & make install# Install mhashCd/usr/local/src/php-lib/mhash-0.9.9.9./Configure --
Preface
It's a tough time to play. In addition to the compiler using Yum installation, all others are compiled manually. Hum ~Seemingly on Nginx, PHP, MySQL three east, but they are too much to rely on others.There is no way to use them to be
PHP has three modes of collaboration with Apache: CGI, Modules, FastCGI.In CGI mode, when a user requests a PHP file, Apache initiates the response process, invokes the PHP processor to process the request, and then returns the result to the client.
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.