If your custom PHP settings (e.g., memory_limit
) aren't appearing on the phpinfo()
page for a Plesk-hosted domain, this guide will help you understand and resolve the issue. This problem often arises on CloudLinux servers with CageFS enabled, which can limit PHP configuration visibility for specific users.
Why Custom PHP Settings Aren't Applied
When CageFS is enabled for a domain's system user in CloudLinux, the user is restricted to the server-wide PHP configuration file. As a result, custom PHP settings made through Plesk (Domains > example_domain.com > PHP Settings) aren't reflected in the phpinfo()
page. Instead, the Loaded Configuration File shows the server-wide PHP configuration:
- For OS PHP:
/etc/php.ini
- For Plesk PHP:
/opt/plesk/php/X.X/etc/php.ini
(whereX.X
is the PHP version, e.g.,/opt/plesk/php/8.1/etc/php.ini
)
This restriction occurs because CageFS prevents the domain system user from accessing custom or additional PHP configurations.
Resolution: Disabling CageFS for the Domain's System User
If CageFS restrictions are unnecessary, you can disable it for the domain's system user. However, if you require CageFS for security or isolation purposes, contact the CloudLinux Support Team for guidance on configuration adjustments.
Option 1: Disable CageFS via the Plesk GUI
- Log in to your Plesk dashboard.
- Navigate to Extensions > My Extensions > CageFS.
- Find and select the system user associated with your domain (e.g., armstrong).
- Click on the << button to disable CageFS for that user.
Disabling CageFS should allow the domain's phpinfo()
page to display the custom PHP settings made in Plesk.
Option 2: Disable CageFS via SSH
- Connect to your server via SSH. If you need assistance connecting, refer to your hosting provider's SSH access guide.
- Run the following command to disable CageFS for the domain's system user (replace
armstrong
with your system username):sudo cagefsctl --disable armstrong
Once CageFS is disabled, custom PHP settings applied in Plesk should be reflected in the domain's phpinfo()
page.
Testing the Resolution
After making these changes, return to Domains > example_domain.com > PHP Settings in Plesk, then click on View the phpinfo() page to confirm that the custom PHP settings are now correctly displayed.
Disclaimer: Always test these changes in a staging environment before applying them to your live server. Refer to the latest guidance in the official Plesk documentation and the CloudLinux documentation for up-to-date recommendations.