Default PHP Versions
132.00stable & 140.00beta01: PHP 7.4.33 | 141.00beta01: PHP 8.3.21
PHP Versions
Centmin Mod compiles PHP from source and supports the following versions (configurable via Menu 5):
| PHP Version | Status | Notes |
|---|---|---|
| PHP 8.5 | Development | Latest development branch |
| PHP 8.4 | Active | Current stable release |
| PHP 8.3 | Active | Default in 141.00beta01 |
| PHP 8.2 | Security | Security fixes only |
| PHP 8.1 | Security | Security fixes only |
| PHP 8.0 | EOL | End of life; custom OpenSSL patches for EL9 |
| PHP 7.4 | EOL | Default in 132.00stable/140.00beta01; custom OpenSSL patches for EL9 |
EL9/EL10 Compatibility
PHP 7.4 and 8.0 on EL9/EL10 systems require Centmin Mod’s custom OpenSSL 1.1.1w patches for compatibility with the system’s OpenSSL 3.x libraries.
PHP Extensions
Centmin Mod includes the following PECL and built-in extensions:
Caching & Performance
- Zend OPcache — Bytecode caching (built-in)
- Redis (phpredis 6.3.0) — Redis client
- igbinary — Binary serializer for Redis/sessions
- Memcached — Memcached client extension
- APCu — User data caching
Image & Media
- ImagicK (3.8.1) — ImageMagick bindings
- GD — Image processing with AVIF support (PHP 8.1+)
- libheif — HEIF/HEIC image format
Database
- MySQLi — MySQL improved driver
- PDO MySQL — PDO driver for MySQL/MariaDB
- MongoDB — MongoDB driver (PHP 8.3+)
Compression & Encoding
- zstd — Zstandard compression
- lz4 — Fast lossless compression
- lzf — LZF compression
- Brotli — Brotli compression
- mbstring — Multibyte string handling
Security & Crypto
- OpenSSL — SSL/TLS support
- sodium — Modern cryptography
- mcrypt — Available as addon for PHP 7.2–8.0
Other
- Swoole — Async I/O and coroutines
- mailparse — RFC 822 email parsing
- GeoIP — Geographic IP lookups
- IMAP — Email access protocol
- intl — Internationalization
php.ini Customization
PHP configuration files are located at:
/usr/local/lib/php.ini— Main php.ini/etc/centminmod/php.d/— Additional .ini files (scan directory)/usr/local/etc/php-fpm.conf— PHP-FPM main config/usr/local/etc/php-fpm.d/www.conf— Default pool configuration
Tip
For persistent PHP configuration changes, use /etc/centminmod/php.d/ scan directory. Files here survive PHP upgrades.
PHP-FPM Security
Centmin Mod applies security hardening to PHP-FPM by default:
- PHP-FPM runs as the
nginxuser with limited permissions expose_php = Offto hide PHP version headersdisable_functionsrestricts dangerous functions- Separate PHP-FPM pools can isolate users/sites
open_basedir Restrictions
The open_basedir directive restricts which directories PHP scripts can access. It can be set per-vhost in the Nginx configuration:
fastcgi_param PHP_VALUE "open_basedir=/home/nginx/domains/domain.com/:/tmp/";
PHP Upgrade / Downgrade (Menu 5)
Use centmin.sh menu option 5 to upgrade or downgrade PHP to any supported version. This recompiles PHP from source with all extensions.
# Set desired PHP version in custom_config.inc
PHP_VERSION='8.4.7'
# Then run centmin.sh and select option 5
centmin.sh
--------------------------------------------------------
Centmin Mod Menu 141.00beta01 centminmod.com
--------------------------------------------------------
1). Centmin Install
2). Add Nginx vhost domain
3). NSD setup domain name DNS
4). Nginx Upgrade / Downgrade
5). PHP Upgrade / Downgrade
6). MySQL User Database Management
7). Persistent Config File Management
8). PostgreSQL Server Management
9). Option Being Revised (TBA)
10). Memcached Server Re-install
11). MariaDB MySQL Upgrade & Management
12). Zend OpCache Install/Re-install
13). Install/Reinstall Redis PHP Extension
14). SELinux disable
15). Install/Reinstall ImagicK PHP Extension
16). Change SSHD Port Number
17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
18). Suhosin PHP Extension install
19). Install FFMPEG and FFMPEG PHP Extension
20). NSD Install/Re-Install
21). Data Transfer
22). Add Wordpress Nginx vhost + Cache Plugin
23). Update Centmin Mod Code Base
24). Exit
--------------------------------------------------------
Enter option [ 1 - 24 ] 5
--------------------------------------------------------
____ _ _ ____ _ _ _
| _ \ | | | || _ \ _ | | | | _ __ __ _ _ __ __ _ __| | ___
| |_) || |_| || |_) |(_) | | | || '_ \ / _` || '__|/ _` | / _` | / _ \
| __/ | _ || __/ _ | |_| || |_) || (_| || | | (_| || (_| || __/
|_| |_| |_||_| (_) \___/ | .__/ \__, ||_| \__,_| \__,_| \___|
|_| |___/
PHP Upgrade/Downgrade - Would you like to continue? [y/n] y
----------------------------------------------------------------
Install which version of PHP? (i.e. 7.3.33, 7.4.33, 8.0.30, 8.1.34, 8.2.30, 8.3.30, 8.4.19, 8.5.4, NGDEBUG)
PHP 7.x/7.1.x/7.2.x/7.3.x is GA Stable but still may have broken PHP extensions.
NGDEBUG is PHP 8.5 dev builds minus incompatible PHP extensions
----------------------------------------------------------------
Current PHP Version: 8.5.3
Latest PHP Version Installable: 8.5.4, 8.4.19, 8.3.30, 8.2.30, 8.1.34, 8.0.30
Enter PHP Version number you want to upgrade/downgrade to: 8.5.4
Do you still want to continue? [y/n] y
----------------------------------------------------------------
existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_110326-022804
----------------------------------------------------------------
-----------------------------------------------------------------------------------------
Detected PHP 8.5 branch.
You can compile Zend OPcache (Zend Optimizer Plus+) support
as an alternative to using APC Cache or Xcache cache.
But Zend OPcache only provides PHP opcode cache and
DOESN'T do data caching, so if your web apps such as Wordpress,
Drupal or vBulletin require data caching to APC or Xcache,
it won't work with Zend OPcache.
-----------------------------------------------------------------------------------------
Do you want to use Zend OPcache [y/n] ? y
PHP Profile-Guided Optimization (PGO) compiles are supported for PHP 7.4+ with GCC to improve PHP-FPM performance by 5-15%.
PHP-FPM Status Page
The PHP-FPM status page is available at /phpstatus and is restricted by IP whitelist in /usr/local/nginx/conf/phpstatus.conf. By default, only 127.0.0.1 is allowed.
To view from within SSH, use lynx or curl. To view from a browser, add your IP to the phpstatus.conf allow list.
# View PHP-FPM status via command line
curl -s http://localhost/phpstatus
# Full status with per-process details
curl -s http://localhost/phpstatus?full
Status Fields Explained
| Field | Description |
|---|---|
| active processes | Number of currently active worker processes |
| idle processes | Idle workers waiting for requests |
| total processes | Total active + idle workers |
| max active processes | Highest concurrent active processes since start |
| max children reached | Times the process limit was reached (increase pm.max_children if > 0) |
| slow requests | Requests exceeding slowlog threshold |
Security Backports for EOL PHP Versions
Centmin Mod actively backports CVE security patches to end-of-life PHP versions via inc/php_patch.inc. These patches are applied automatically during PHP (re)installs and upgrades via Menu 5, reducing exposure even on versions that no longer receive upstream security releases.
| PHP Version | Upstream Status | Centmin Mod CVE Backports |
|---|---|---|
| PHP 8.0.x | EOL | Through 2025 (cve-2025-* series, ghsa-www2-q4fc-65wf) |
| PHP 7.4.33/34 | EOL | Through 2025 (cve-2025-* series, cve-2025-14177/78) |
| PHP 7.3.x | EOL | Through 2025 (ghsa-4w77-75f9-2c8w) |
| PHP 7.2.x | EOL | Through 2025 (cve-2024-11236, ghsa-4w77-75f9-2c8w) |
| PHP 7.1.x | EOL | Through 2024 (cve-2024-8927 series) |
| PHP 7.0.x | EOL | Through 2024 (cve-2024-8927 series) |
| PHP 5.6.x | EOL | Through 2024 (cve-2024-8927 series) |
| PHP 5.5.x, 5.4.x | EOL | Limited (bug #81719) |
| PHP 5.3.x | EOL | php53.patch |
| PHP 8.1.x, 8.2.x | Security | Standard upstream security releases (no Centmin Mod backports needed) |
Upgrade Recommended
While Centmin Mod backports reduce exposure, EOL PHP versions have no upstream security support. Upgrading to PHP 8.3+ is strongly recommended for production servers.
Need help?
Join the community forums for PHP-FPM configuration help and optimization tips.