Hopefully this will help ease someone else's pain after the 11.36 upgrade. This has been an absolute nightmare for us. (To be fair, some of our cpanel installations have been running in excess of 14 years, so it's no wonder some of these issues fell through the QA cracks.)
Issues:
Proximate Cause:
NOTE: For all issues noted above PHP was running in DSO mode.
Changes to the cPanel EasyApache PHP build process left behind multiple stale loadable modules, which caused instability in the mod_php DSO, resulting in the high load and segmentation faults.
Remedial Steps:
Issues:
- Client reported multiple sites unreachable and high server load.
- Websites returning blank pages randomly (segmentation fault in error_log).
- PHP complaining about included files that are "missing", when in fact they are not. Reloading the page in the browser will usually fix the problem.
Proximate Cause:
NOTE: For all issues noted above PHP was running in DSO mode.
Changes to the cPanel EasyApache PHP build process left behind multiple stale loadable modules, which caused instability in the mod_php DSO, resulting in the high load and segmentation faults.
Remedial Steps:
- Run "php -m" as root to show the list of PHP modules in use and save the output. You'll need this later.
- Create a backup copy of /usr/local/lib/php.ini.
- Edit /usr/local/lib/php.ini - comment out any line starting with "extension=".
- Backup the contents of /usr/local/lib/php/extensions/no-debug-non-zts-20060613 to an alternate location and note which .so files were present. You'll need this later.
- Remove all files from /usr/local/lib/php/extensions/no-debug-non-zts-20060613 before executing the next step.
- Rename /root/php/ext to /root/php/ext.old, if it exists.
- Link /root/php/ext to /usr/local/lib/php/extensions/no-debug-non-zts-20060613
NOTE: This is required on some systems, as the WHM Module Installer installs PHP PECL modules in /root/php/ext, but then configures php.ini to look for them in /usr/local/lib/php/extensions/no-debug-non-zts-20060613 - Run /scripts/easyapache - select Apache 2.2 if not already selected (resolves known security issues with Apache 2.1) and the latest non-experimental PHP 5.2 version (should be 5.2.17), ASSUMING the server is not already running PHP 5.3, in which case you would pick the latest non-experimental 5.3 version available.
- In the "exhaustive list" of options for Apache and PHP, make sure the the PDO libraries are selected (i.e. PDO, PDO_MySQL, and PDO_SQLite). The PECL PDO libraries are deprecated and will no longer function properly. Start the EasyApache build process once these selections are made.
- Remount /tmp and /var/tmp as rw, exec, dev, suid
- Once the EasyApache build process is complete, log into WHM and navigate to the Software => Module Install => PECL menu.
- Referencing the list created in step #4, re-install all of the PECL modules listed. Note that some modules (json, homeloader, etc.) have been rolled into the PHP core code base and are no longer required.
- Remount /tmp and /var/tmp as rw, noexec, nodev, nosuid.
- Restart httpd.
- Verify modules in the output of "php -m" match the list from step 1.
- Watch /etc/httpd/logs/error_log for any sign of segmentation faults.