Knowledgebase

Different PHP Version per domain/folder: selected modules are not used.

When you want to use different PHP versions per domain or folder on your server, you might be using a solution like PHP-FPM pools or a PHP selector tool provided by your hosting environment. However, you're experiencing issues with selected modules not being used.

Here are steps to troubleshoot and potentially resolve this issue:

  1. Check Configuration Files:

    • Verify that the configuration files for each PHP version are correctly set up. This includes the php.ini files and any additional configuration files specific to the PHP version.
  2. Verify Module Availability:

    • Confirm that the required modules are enabled in the php.ini file for each PHP version you're using. Make sure that the modules you need are not commented out.
  3. Restart PHP-FPM or Web Server:

    • After making changes to PHP configurations, you'll need to restart the PHP-FPM service or the web server (e.g., Nginx, Apache) for the changes to take effect.
  4. Check FastCGI Configurations:

    • If you're using FastCGI to handle PHP requests, ensure that it's configured correctly and that it's using the correct PHP version for each domain or folder.
  5. Inspect Virtual Host Configurations:

    • If you're using Apache, check the virtual host configurations to ensure that they are set up to use the correct PHP version for each domain or folder.
  6. Verify .htaccess Files:

    • Check if there are any .htaccess files in the domains or folders that might override PHP configurations. Make sure they are not interfering with the module loading.
  7. Review PHP-FPM Pool Configuration:

    • If you're using PHP-FPM pools, ensure that each pool is configured to use the correct PHP version.
  8. Check for Conflicting Directives:

    • Make sure that there are no conflicting directives in the configurations. For example, if you have conflicting extension_dir directives, it can cause issues.
  9. Clear PHP Opcode Cache (If Applicable):

    • If you're using an opcode cache like OPcache, make sure to clear it after making changes to the PHP configurations.
  10. Verify Logs:

    • Check the PHP and web server error logs for any messages related to module loading or conflicts. This can provide valuable information about what might be causing the issue.
  11. Test Simple PHP Script:

    • Create a simple PHP file (e.g., phpinfo.php) with the following content:

      php
    • <?php phpinfo();

      Place this file in the domain or folder and access it through a web browser. This will display information about the PHP configuration. Check if the modules you expect are loaded.

  1. Contact Hosting Provider or System Administrator:

    • If you've tried the above steps and still can't get the selected modules to work, consider reaching out to your hosting provider or system administrator for further assistance.

Remember to back up your configuration files before making any changes, and always exercise caution when modifying critical server settings. If in doubt, consult with a qualified professional for guidance.

 
 
 
 
  • 0 Users Found This Useful
Was this answer helpful?