# How to Compare PHP Settings for Web and CLI Runs

https://ferkesh.net/zh/knowledgebase/article/php-web-cli-configuration-mismatch

![Four-step workflow. Check panel runtime. Read CLI settings. Compare specific limits. Retest the task.](https://ferkesh.net/kb-media/ferkesh-guide-diagrams-batch-10.svg#php-web-cli-configuration-mismatch)

Write down the PHP version and handler shown for the affected website in the hosting panel. Record the one setting you are investigating, such as memory_limit. Use the panel or an authenticated diagnostic view for the web value. Avoid putting a public phpinfo() page on the site, since its output can disclose infrastructure and environment details.

In a shell you are authorized to use, run php --ini for the runtime that actually launches the task. A bare php command may resolve to a different executable from the one configured in a scheduled task. Compare the executable location, version, loaded configuration and additional files. Settings can also differ because the application or handler applies per-directory or per-pool values.

Verify with the exact website request and the exact authorized job command after any change. On a shared platform, adjust domain settings or a job’s explicit interpreter before considering server-wide defaults. Record both contexts so the next upgrade can repeat the comparison.

If a form submits while later fields disappear, [diagnose PHP max_input_vars form truncation](https://ferkesh.net/knowledgebase/article/php-max-input-vars-form-truncation) under the web runtime rather than relying on CLI values.

## Related guides

- [How to Identify the PHP Handler Serving a Plesk Website](https://ferkesh.net/knowledgebase/article/plesk-identify-php-handler)
- [Developer Resources category](https://ferkesh.net/knowledgebase/category/developer-resources)

## Official references

- [PHP core directives](https://www.php.net/manual/en/ini.core.php)

Ferkesh Hosting. Last reviewed November 26, 2026.
