Knowledgebase

Different values in phpinfo | local and master value

When you see different values in phpinfo() for "local" and "master" settings, it typically means that there are different configurations for PHP at different levels:

  1. Local Value:

    • The "local" value refers to the current configuration set in the PHP script or within the scope where phpinfo() is called. This value is specific to the script or request being executed.
  2. Master Value:

    • The "master" value refers to the default configuration set in the php.ini file. This value acts as a global default for PHP on your server.

Here are a few common scenarios where you might observe different values:

  1. Custom .htaccess Settings:

    • If there are custom PHP settings specified in the .htaccess file for a specific directory or domain, they will be reflected in the "local" value.
  2. Custom php.ini File:

    • Sometimes, a custom php.ini file may be used for a specific domain or directory. This overrides the global php.ini settings for that specific location.
  3. PHP-FPM Pools:

    • If you're using PHP-FPM, different pools can have their own configuration settings. Each pool can have its own php.ini file or override certain settings.
  4. Apache Virtual Hosts:

    • If you have multiple virtual hosts set up in Apache, each can have its own custom PHP settings defined in the VirtualHost configuration.
  5. Different PHP Versions:

    • If you have multiple PHP versions installed on your server, they may have different php.ini files with different configurations.
  6. Server-Level Configuration:

    • There may be server-level configuration settings set by your hosting provider or server administrator.
  7. FastCGI and suPHP:

    • If you're using FastCGI or suPHP, they may have their own configuration settings that override the global php.ini.
  8. .user.ini Files:

    • In PHP 5.3.0 and later, you can use .user.ini files to override specific settings. These files can be placed in individual directories.

To address discrepancies between "local" and "master" values, you'll need to review and adjust the specific configurations in the affected scope (e.g., .htaccess, virtual host settings, PHP-FPM pools, etc.) to align with your desired values. Keep in mind that some configurations may require server-level access or permissions. Always make sure to back up any configuration files before making changes.

 
  • 0 Users Found This Useful
Was this answer helpful?