If you're encountering an issue where an invalid php.ini
is being used for lap domains in Plesk, it could be due to various reasons. Here are steps you can take to troubleshoot and potentially resolve the issue:
-
Check PHP Versions:
Verify that you have the correct PHP versions installed and enabled for Lap in Plesk.
-
Check PHP Settings in Plesk:
- Log in to Plesk.
- Go to "Domains" and select the affected domain.
- Under "PHP Settings," ensure the correct PHP version is selected.
-
Check
php.ini
Files:- Make sure that there are no conflicting
php.ini
files present. Check for any customphp.ini
files in the domain's document root or subdirectories.
- Make sure that there are no conflicting
-
Verify CageFS Configuration:
If you're using CageFS, check if it's causing any restrictions on
php.ini
files. You may need to update CageFS configurations. -
Check Permissions:
Ensure that the
php.ini
file and its parent directories have the correct permissions and ownership. It should be readable by the web server process.bash
-
chmod 644 /path/to/php.ini
-
Review Mod_lsapi Configuration:
Verify that mod_lsapi is correctly configured in Apache. Check if there are any directives that might be overriding the
php.ini
settings. -
Check for Custom PHP Handlers:
If you've set up custom PHP handlers, make sure they are configured correctly and do not conflict with Lap.
-
Restart Apache:
After making any changes to the configuration, restart Apache to apply the settings:
bash -
systemctl restart apache2
-
Verify
phpinfo()
:Create a simple PHP file with the following content:
php
-
phpinfo();
Upload it to your domain's document root and access it via a web browser. Check which
php.ini
file is being used. -
Clear PHP Caches:
If you're using any PHP opcode caches like OPcache or APC, try clearing their caches.
-
Consult with Plesk Support:
If none of the above steps work, consider reaching out to Plesk support for further assistance. They may have specific recommendations or solutions for this issue.
Always make sure you have backups available before making significant modifications to your server configuration. If you're unsure about any of the steps, consider seeking advice from your hosting provider or system administrator.