📑 Daftar Isi
- First, Figure Out What's Running Right Now
- Step 1 — Drop a phpinfo() Probe
- Step 2 — Check the Running Handler From the Shell
- Step 3 — List What's Actually Installed
- EasyApache PHP vs Alt-PHP: The Real Differences
- How the Two Stacks Actually Work
- Why Both Can Be Active at Once
- Switching Versions With EasyApache (MultiPHP Manager)
- Switching Versions With Alt-PHP (PHP Selector)
- .htaccess vs .user.ini — The Trap That Gets Everyone
- Managing Extensions on Each Stack
- ionCube and Other Loaders
- Performance: Which One Is Actually Faster?
- Which One Should You Use?
- Troubleshooting Table
- FAQ
EasyApache PHP vs Alt-PHP on CloudLinux cPanel — A Complete Guide for Shared Hosting
Here’s a scene I’ve lived through more times than I’d like. A client opens a ticket: “We upgraded to PHP 8.2 in WHM, but the site is still running 7.4 and it’s slow as molasses.” I SSH in, check phpinfo(), and sure enough — PHP 7.4 serving the page. Then I check the CLI, and it proudly reports 8.2. Two different answers, same server. If you manage cPanel + CloudLinux shared hosting, I guarantee you’ve hit this wall too. The culprit is almost always the same: EasyApache PHP vs Alt-PHP, and not understanding who’s actually in charge.
Let me give you a mental picture before we dive into the weeds. Think of your server as an apartment building. EasyApache PHP is the boiler room that feeds the whole building — one thermostat, one system, one point of control. Alt-PHP is like having a separate mini-boiler in every apartment. Same hot water, but each unit controls its own temperature, and one broken unit doesn’t freeze the neighbors. That’s the core difference in one sentence.
Here’s the thing you need to lock in before anything else: this isn’t about PHP versions, and it’s not about which one is “newer.” EasyApache PHP is compiled by cPanel as part of EasyApache 4 (packages named ea-php56 through ea-php84), and it runs through either the DSO/mod_php handler or PHP-FPM, controlled from WHM’s MultiPHP Manager. Alt-PHP is CloudLinux’s own PHP build (packages named alt-php71 through alt-php84), and it runs exclusively as PHP-FPM with a dedicated pool per user, controlled from cPanel’s PHP Selector. Different stack, different config files, different extension packages. Mixing them up is where the pain starts.
Why should you care if you run shared hosting? Because both systems can be live on the same box at the same time, and the interaction between them decides which PHP version your users actually get. Set PHP 8.2 in MultiPHP Manager while PHP Selector still points that account to 7.4, and guess what shows up in the browser? 7.4. You’ll burn an afternoon hunting for a bug that doesn’t exist. Worse, the fallout is real: random HTTP 500s after a version switch, ionCube failing to load, sessions dropping users mid-login, and support teams pointing fingers at each other.
Okay, enough throat-clearing. In this guide I’m going to break down the real differences between EasyApache PHP and Alt-PHP on cPanel CloudLinux shared hosting — architecture, handlers, packages, extension management, how to actually check which version is serving requests, and a troubleshooting table you can paste into your next ticket. I run these systems every single day, so everything here comes from production, not from a vendor blog. Let’s get to it.
First, Figure Out What’s Running Right Now
Before we compare anything, you need to know what your server is actually doing. Skip this step and you’ll be debugging blind. Here’s the fastest way to ground yourself.
Step 1 — Drop a phpinfo() Probe
Create a tiny file in the document root of the affected account:
echo '<?php phpinfo(); ?>' > /home/username/public_html/info.php
Then open https://domain.com/info.php and read three fields:
- PHP Version — the version actually serving requests.
- Server API — “Apache 2.0 Handler” means DSO/mod_php (almost certainly ea-php). “FPM/FastCGI” means PHP-FPM (could be ea-php or alt-php). “CGI/FastCGI” means suPHP.
- Loaded Configuration File — the php.ini in use. A path like
/opt/alt/php82/etcscreams Alt-PHP;/opt/cpanel/ea-php82/root/etcscreams EasyApache.
Delete info.php when you’re done. It’s a sensitive file and you don’t want it indexed or crawled.
Step 2 — Check the Running Handler From the Shell
httpd -M | grep -i php
Output like php_module (shared) means mod_php is loaded. Then check which FPM services are alive:
systemctl status alt-php82-php-fpm
systemctl status php-fpm82
An active alt-php82-php-fpm means CloudLinux’s PHP is in the driver’s seat. An active php-fpm82 means EasyApache’s PHP-FPM is doing the work.
Step 3 — List What’s Actually Installed
rpm -qa | grep -E 'ea-php8|alt-php8'
This shows every version present in both stacks. If you only see ea-php82 packages and no alt-php82, then PHP Selector isn’t serving that version.
EasyApache PHP vs Alt-PHP: The Real Differences
Now that you know how to check, let’s compare the two properly.
| Aspect | EasyApache PHP | Alt-PHP (PHP Selector) |
|---|---|---|
| Maintainer | cPanel (EasyApache 4) | CloudLinux |
| Package prefix | ea-php82-php-* | alt-php82-php-* |
| CLI binary path | /opt/cpanel/ea-php82/root/usr/bin/php | /opt/alt/php82/usr/bin/php |
| Handlers | DSO/mod_php, suPHP, or PHP-FPM (per domain) | PHP-FPM (or lsphp on LiteSpeed) |
| Control panel | WHM → MultiPHP Manager | cPanel → Select PHP Version |
| Per-user isolation | Depends on handler | Full, via per-user FPM pools |
| Per-user config | MultiPHP INI Editor | .user.ini via PHP Selector |
The golden rule: ea-php and alt-php are separate binaries with separate php.ini files and separate extension sets. Installing an extension on ea-php82 does nothing for alt-php82. This single misunderstanding causes half the “my extension disappeared” tickets I see.
How the Two Stacks Actually Work
EasyApache PHP — cPanel’s Own Build
Back in the EasyApache 3 days, PHP was compiled straight into Apache as mod_php. Switching PHP versions meant rebuilding Apache — downtime, whole server affected. EasyApache 4 fixed that by shipping PHP as standalone packages. You can install several versions side by side and route each domain to whichever you want through MultiPHP Manager, with a choice of handler per domain: DSO (fast, but runs inside Apache), suPHP (isolated CGI, slower), or PHP-FPM (isolated and fast).
Alt-PHP — CloudLinux’s Per-User PHP
CloudLinux ships its own PHP builds because the whole point of the OS is multi-tenant isolation. Each alt-php version runs as PHP-FPM with a separate pool per user. Account A picks 8.2, account B picks 7.4, both run side by side, and neither can step on the other’s toes. On LiteSpeed servers, PHP Selector uses lsphp instead of PHP-FPM, but the isolation story is the same.
Why Both Can Be Active at Once
This is the part that trips up most people. On a cPanel + CloudLinux server, EasyApache 4 and PHP Selector coexist by design. Which version actually wins? It’s a simple priority chain:
- CloudLinux PHP Selector (alt-php) — if the account already has a version set under “Select PHP Version”, that wins.
- MultiPHP Manager (ea-php) — applies only if PHP Selector isn’t covering the account.
- The global EA4 PHP version — the last-resort fallback.
So the client from my opening story wasn’t wrong and the server wasn’t broken. The account was simply pinned to 7.4 in PHP Selector, which overrode the 8.2 they’d set in MultiPHP. Once you internalize this chain, half your PHP “ghost” issues disappear.
Switching Versions With EasyApache (MultiPHP Manager)
- Log into WHM → Software → MultiPHP Manager.
- Pick the domain and the PHP version you want.
- Click Apply and wait for the change to propagate.
You can also pick the handler per domain here. For production sites, PHP-FPM is the sane choice.
Switching Versions With Alt-PHP (PHP Selector)
- Log into the account’s cPanel → Software → Select PHP Version.
- Choose the version and click Set as current.
- On the Extensions tab, enable or disable per-user extensions.
- Use the Options tab to adjust INI values (memory_limit, upload_max_filesize, etc.) without touching the global php.ini.
PHP Selector generates a per-user .user.ini in public_html. That file carries all your per-account settings and overrides the global ini.
.htaccess vs .user.ini — The Trap That Gets Everyone
Here’s a classic. Under DSO/mod_php, you could drop php_value memory_limit 256M into .htaccess and it just worked. Switch to PHP-FPM — which includes every Alt-PHP version — and those directives are silently ignored. No error, no warning, just nothing. Move the settings to .user.ini instead.
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 66M
max_execution_time = 300
After editing .user.ini, the FPM pool sometimes needs a nudge:
systemctl reload alt-php82-php-fpm
Managing Extensions on Each Stack
EasyApache Extensions
yum install ea-php82-php-mysqlnd ea-php82-php-gd ea-php82-php-intl
Then restart whatever the handler needs — Apache for DSO, or php-fpm82 for PHP-FPM:
/scripts/restartsrv_apache
Alt-PHP Extensions
yum install alt-php82-php-mysqlnd alt-php82-php-gd alt-php82-php-intl
Then restart the FPM service:
systemctl restart alt-php82-php-fpm
ionCube and Other Loaders
Licensed scripts often need the ionCube Loader. On PHP Selector it’s a checkbox: Select PHP Version → Extensions → tick ionCube. On EasyApache you install the package:
yum install ea-php82-php-ioncube-loader
Restart the matching service, then re-check phpinfo(). If ionCube still doesn’t show, verify the PHP version is actually supported by the loader — bleeding-edge PHP releases sometimes don’t have a loader build yet.
Performance: Which One Is Actually Faster?
The honest answer is that speed is about the handler, not the vendor. Alt-PHP runs PHP-FPM with per-user OPCache, which handles multi-tenant loads more gracefully than DSO. FPM pools have max_children limits, they restart independently, and one broken account won’t sink the whole Apache. DSO has lower per-request latency (no extra process hop) but it lives inside Apache and shares its fate — one memory-hungry site can drag everyone down. That’s exactly why CloudLinux pairs with PHP-FPM: the LVE (Lightweight Virtual Environment) caps per-user resources so a runaway account can’t kill its neighbors. If you want to dig into load and resource limits, I’d point you to our notes on checking server load average and reading CloudLinux LVE limits.
Which One Should You Use?
My rule of thumb after years of doing this:
- Go Alt-PHP (PHP Selector) when you run true shared hosting — many accounts, hard isolation, and users who want to flip PHP versions themselves. It’s the standard setup on CloudLinux.
- Stick with EasyApache PHP when you need a package that only exists in cPanel’s repo, need a version alt-php hasn’t shipped yet, or you’re on a single-site cPanel VPS where per-user isolation doesn’t matter.
Troubleshooting Table
| Symptom | Likely Cause | Check | Fix |
|---|---|---|---|
| phpinfo() disagrees with WHM | PHP Selector overrides MultiPHP Manager | cPanel → Select PHP Version | Set the version in PHP Selector to match |
| HTTP 500 right after a version switch | Required extension missing on the new stack | /var/log/apache2/error_log and phpinfo() | Install the matching ea-phpXX-php-* / alt-phpXX-php-* package, restart the service |
| Extensions missing in phpinfo() | Installed on the wrong stack | rpm -qa | grep -E ‘ea-php|alt-php’ | Install the extension for the stack the account actually uses |
| Select PHP Version missing in cPanel | PHP Selector not installed or account out of scope | Check alt-php packages and cloudlinux-selector config | Install/enable PHP Selector and add the user to its scope |
| ionCube Loader not found | Loader missing on the active stack | phpinfo() → ionCube Loader | Tick ionCube in PHP Selector, or install ea-phpXX-php-ioncube-loader |
| php_value in .htaccess ignored | PHP-FPM doesn’t read .htaccess directives | Server API in phpinfo() | Move settings to .user.ini |
| Users logged out randomly | Handler or session path changed between versions | Compare session.save_path across stacks | Normalize session.save_path, retest logins |
| CLI version differs from web version | PATH resolves to the other stack’s binary | which php, then check both binary paths | Call the correct binary explicitly |
Those eight rows cover most of the PHP-related tickets that land on my desk. For more depth on the 500 side of things, see fixing HTTP 500 errors on cPanel, and if your box is chronically out of disk — which produces the weirdest PHP errors you’ll ever see — take a look at handling disk full on cPanel. And if FPM memory is your current obsession, checking PHP-FPM memory usage is a good follow-up read.
Still with me? Good, because here’s the one-paragraph version: EasyApache PHP is cPanel’s build, managed from WHM, and it can run DSO or FPM. Alt-PHP is CloudLinux’s build, managed from cPanel’s PHP Selector, and it always runs as isolated per-user FPM pools. Both can be live on one server, and PHP Selector wins the tiebreak. When your version “refuses to change,” check PHP Selector before you blame MultiPHP Manager — nine times out of ten, that’s where the ghost is hiding.
FAQ
Q: Can EasyApache PHP and Alt-PHP run on the same server at once?
Yes — that’s the normal state on CloudLinux shared hosting. cPanel and CloudLinux are designed to coexist. Just remember the priority: PHP Selector (alt-php) wins for any account that has a version set there, then MultiPHP Manager (ea-php).
Q: Which is faster, EasyApache PHP or Alt-PHP?
It’s the handler that matters, not the vendor. Alt-PHP is always PHP-FPM, which gives you per-user OPCache and pool limits. EasyApache can run DSO (low latency, high resource risk) or PHP-FPM. On multi-tenant shared hosting, PHP-FPM from either stack is the safer, more consistent bet.
Q: I set PHP 8.2 in MultiPHP Manager but the site still shows 7.4. Why?
Almost certainly the account is pinned to an older version in PHP Selector, which overrides MultiPHP. Open cPanel → Select PHP Version for that account, set it to 8.2, and re-check phpinfo(). Clear the browser cache and OPCache if the change doesn’t appear right away.
Q: How do I install the ionCube loader on Alt-PHP?
In cPanel → Select PHP Version → Extensions, tick ionCube Loader and save. On EasyApache, install the package instead: yum install ea-php82-php-ioncube-loader, then restart the PHP service for that stack.
Q: Why did php_value in my .htaccess stop working?
Because your handler is now PHP-FPM (or suPHP), neither of which reads php_value/php_flag from .htaccess. Move those settings into .user.ini in public_html, or set them under Select PHP Version → Options.
So there you have it — the full picture of EasyApache PHP versus Alt-PHP on cPanel CloudLinux. Next time a ticket says “PHP version won’t change,” you’ll know exactly where to look: PHP Selector first, MultiPHP second, and check the handler before you touch any config. Bookmark this one for reference, and if you’ve hit a handler quirk I didn’t mention, drop it in the comments — I’m always up for learning a trick I haven’t seen yet. Happy troubleshooting!