PHP

PHP FPM

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

CentOS 9

dnf config-manager --set-enabled crb
yum install oniguruma-devel

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:

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

Technology:

Post date Technology
1 month 1 week PHP 8.3.11 Released!
1 month 1 week PHP 8.4.0 Beta 4 now available for testing
1 month 1 week PHP 8.2.23 Released!
1 month 1 week API Platform Conference 2024
1 month 3 weeks PHP Russia 2024
1 month 3 weeks ConFoo Montreal 2025: Call for Papers
1 month 3 weeks PHP 8.4.0 Beta 3 now available for testing
2 months 1 week PHP 8.4.0 Alpha 4 available for testing
2 months 1 week PHP 8.2.22 Released!
2 months 1 week PHP 8.3.10 Released!
2 months 3 weeks CascadiaPHP 2024
2 months 3 weeks PHP 8.4.0 Alpha 2 available for testing
3 months 6 days PHP 8.4.0 Alpha 1 available for testing
3 months 1 week PHP 8.3.9 Released!
3 months 1 week PHP 8.2.21 Released!
3 months 2 weeks CascadiaPHP 2024 - Call For Papers
3 months 4 weeks PHPCon Poland 2024
4 months 15 hours International PHP Conference Munich 2024
4 months 4 days Forum PHP 2024 - Paris (France)
4 months 5 days PHP 8.2.20 Released!
4 months 5 days PHP 8.3.8 Released!
4 months 5 days PHP 8.1.29 Released!
4 months 3 weeks PHP Velho Oeste 2024
5 months 3 days PHP 8.3.7 Released!
5 months 3 days PHP 8.2.19 Released!

Pages

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

  • 5 days 51 min ago
    1.27.2 update
  • 2 weeks 2 days ago
    Drupal 10/11 config
  • 2 weeks 3 days ago
  • PHP
    2 weeks 3 days ago
    PHP 8.3.11 and AlmaLinux
  • 2 weeks 4 days ago
    New version of Pound