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
0 sec PHP Velho Oeste 2024
3 hours 22 min Statement on glibc/iconv Vulnerability
1 week 5 days PHP 8.1.28 Released!
1 week 6 days PHP 8.3.6 Released!
1 week 6 days PHP 8.2.18 Released!
1 month 3 days CakeFest 2024: The Official CakePHP Conference
1 month 1 week PHP 8.3.4 Released!
1 month 1 week PHP 8.2.17 Released!
2 months 1 day PHPerKaigi 2024
2 months 1 week PHP 8.2.16 Released!
2 months 1 week PHP 8.3.3 Released!
2 months 3 weeks php[tek] 2024 - Sheraton Suites O'Hare, Rosemont, IL
3 months 1 week PHP 8.2.15 Released!
3 months 1 week PHP 8.3.2 Released!
3 months 1 week SymfonyCon Vienna 2024
3 months 1 week SymfonyLive Paris 2024
3 months 1 week SymfonyOnline January 2024
3 months 1 week Web Summer Camp 2024
3 months 1 week Laravel Live Denmark 2024
3 months 2 weeks Unveiling the ConFoo 2024 edition!
3 months 2 weeks PHP Conference Hokkaido 2024
3 months 2 weeks PHP Conference Fukuoka 2024
3 months 2 weeks PHP Conference Kagawa 2024
3 months 2 weeks Drupal Mountain Camp 2024
4 months 5 days PHP 8.2.14 Released!

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

  • 2 years 1 day ago
  • 2 years 1 day ago
  • 2 years 3 days ago
    php 8.x
  • 2 years 4 days ago
    10.6.7
  • 2 years 6 days ago
    Drop Centos 5/6 stuff