Configuring PHP error display and logging with CloudLinux in Plesk

PHP errors are useful for diagnosis, but displaying them on a public site can expose filesystem paths and application details. For a production website, keep public error display off and investigate the error log. Temporary display is most appropriate in a restricted development environment.

Check access and requirements

Record the time and URL of the failure and locate the account's error log. If a test requires visible errors, use staging or an access-restricted copy and avoid processing live customer information there.

01 Change the setting

  1. In Plesk, select the correct subscription and open PHP Selector from the available sidebar or additional tools. This guide applies to Linux subscriptions where the CloudLinux integration is installed. Windows Plesk uses its own PHP configuration.
  2. Check the active PHP version and which websites the selector change will affect. Plesk also has a native PHP Settings page for each domain. A CloudLinux setting will not automatically override a different Plesk PHP handler. Confirm which handler serves the website first.
  3. Open Options and find display_errors. Set it to Off for production, or temporarily enable it in the controlled test environment.
  4. Where exposed, check that log_errors is enabled and that the configured log is outside public downloads or otherwise access restricted. Save your changes.
  5. Reproduce the fault once and read the newest matching log entry. Fix the identified cause, then keep public display disabled when returning the site to normal operation.

Confirm the expected result

Visit the affected page as a signed-out visitor and confirm that it no longer exposes a stack trace or server path. Verify that a reproducible test error is still recorded in the intended log so that disabling display does not remove your ability to diagnose problems.

Why can errors still appear, or fail to reach the log, after I change these settings?

Application debug modes can control their own output independently of PHP. Check the CMS or framework's production/debug configuration too. If nothing reaches the selected log, the website may use another PHP handler or a different log location. Share a redacted error excerpt with support.

  • 0 Users Found This Useful
  • plesk, development
Was this answer helpful?

Related Articles

Changing the PHP post_max_size limit with CloudLinux in Plesk

post_max_size limits the size of the entire HTTP POST body received by PHP. It includes...

Changing the PHP upload_max_filesize limit with CloudLinux in Plesk

upload_max_filesize sets the maximum size of an individual uploaded file accepted by PHP. The...

Managing PHP extensions with CloudLinux in Plesk

Extensions add capabilities such as database access, multibyte text handling, image processing...

Adjusting the PHP memory limit with CloudLinux in Plesk

memory_limit limits memory available to an individual PHP script. Increasing it can help a...

Enabling the Mailparse extension with CloudLinux in Plesk

Mailparse helps PHP software inspect MIME email messages and attachments. A helpdesk, mail...