PHP

PHP FPM

PHP-FPM is an alternative PHP FastCGI implementation with some additional features (mostly) useful for heavy-loaded sites.

PHP Installation
Configure PHP:

./configure \
--with-config-file-path=/usr/local/etc/ \
--enable-fpm \
--enable-pdo \
--enable-mbstring \
--with-gd \
--with-curl \
--with-jpeg-dir \
--with-bz2 \
--with-zlib \
--with-pdo-mysql=/usr/local/mysql

Build and install:

make
make install

Copy the default configuration files:

Technology:

Zend OPcache

PHP 5.5 includes the Zend OPcache and is built by default unless the building of default extensions was disabled with --disable-all.
Enable OPcache by uncomment/adding some default settings in /usr/local/php/php.ini:

Technology:

nginx

PHP Installation
Configure PHP:

./configure \
--with-config-file-path=/usr/local/etc/ \
--enable-fpm \
--enable-pdo \
--enable-mbstring \
--with-gd \
--with-curl \
--with-jpeg-dir \
--with-bz2 \
--with-zlib \
--with-pdo-mysql=/usr/local/mysql

Build and install:

make
make install

Copy the default configuration files:

Technology:

PHP News

Post date Technology
1 week 2 days PHP 8.1.6 Released!
1 week 3 days PHP 8.0.19 Released!
2 weeks 2 days CakeFest 2022: The Official CakePHP Conference
3 weeks 6 days Dutch PHP Conference 2022 - Schedule
1 month 1 week PHP 8.0.18 Released!
1 month 1 week PHP 8.1.5 Released!
1 month 1 week PHP 7.4.29 Released!
2 months 5 days PHP 8.1.4 Released!
2 months 6 days PHP 8.0.17 Released!
3 months 3 days PHP 8.0.16 Released!
3 months 3 days PHP 8.1.3 Released!
3 months 3 days PHP 7.4.28 Released!
3 months 3 weeks phpday 2022
4 months 1 day PHP 8.1.2 Released!
4 months 1 day PHP 8.0.15 Released!
5 months 2 days Dutch PHP Conference 2022 - Call for Papers
5 months 6 days PHP 8.0.14 Released!
5 months 6 days PHP 7.4.27 Released!
5 months 1 week The Online PHP Conference 2022
5 months 3 weeks PHP 8.1.0 Released!
6 months 13 hours PHP Foundation Announced
6 months 4 days PHP 8.0.13 Released!
6 months 5 days PHP 7.3.33 Released!
6 months 5 days PHP 7.4.26 Released!
6 months 1 week International PHP Conference Berlin 2022

Pages

Technology:

FastCGI

FastCGI is a protocol for interfacing interactive programs with a web server. It's main aim is to reduce the overhead associated with interfacing the web server and CGI programs, allowing a server to handle more web page requests at once.

Technology:

spawn-fcgi

spawn-fcgi allows you to run FastCGI separate from Lighttpd.

cd /extra/src
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
tar zxf spawn-fcgi-1.6.3
cd spawn-fcgi-1.6.3

Automatic Startup
FastCGI can be supervised by daemontools.
Assuming you have already installed daemontools, create the directories to hold the lighttpd run script, logging script, and config files:

cd /var/service
mkdir -m 1755 fast-cgi
cd fast-cgi

Create the run script (/var/service/fast-cgi/run), with the following:

Technology:

Xcache

XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce server load.

Requirements
If phpize complains about being unable to find autoconf:

yum install autoconf

Installation with Lighttpd
Download the latest release of Xcache:

cd /extra/src
wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
tar zxf xcache-1.3.2.tar.gz
cd xcache-1.3.2
phpize
./configure --enable-xcache
make
make install

Copy the default configuration into your php.ini:

Technology:

FastCGI

FastCGI is a language independent, scalable, open extension to CGI that provides high performance and persistence without the limitations of server specific APIs.

Installation
Install fastcgi libraries:

cd /extra/src
wget http://www.fastcgi.com/dist/fcgi-current.tar.gz
tar zxf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure
make
make install

Download the mod_fastcgi source:

cd /extra/src
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
tar zxf mod_fastcgi-current.tar.gz
cd mod_fastcgi-2.4.6
cp Makefile.AP2 Makefile
make
make install

PHP Configuration
In addition to any other directives, PHP needs to be configured with:

--enable-fastcgi \

Technology:

Pages

Subscribe to RSS - PHP

Recent Updates

  • 3 weeks 6 days ago
  • 3 weeks 6 days ago
  • 1 month 34 min ago
    php 8.x
  • 1 month 1 day ago
    10.6.7
  • 1 month 2 days ago
    Drop Centos 5/6 stuff