Bobcares

PHP errors not displaying on OVH

PDF Header PDF Footer

Find out how to resolve the problem of PHP errors not displaying on OVH. Our OVH Support team is ready to assist you.


PHP errors not displaying on OVH

PHP makes debugging easier by showing errors in the browser using the display_errors setting. Even with this setting enabled, errors may not show up on platforms such as OVH. In this guide, you’ll learn what causes this issue and how to fix it quickly.

What are display_errors in PHP?

The display_errors directive controls whether PHP shows error messages directly in the browser. Errors are displayed on the screen if enabled, which can be useful for development. If log_errors is enabled, PHP logs errors instead of showing them to users. This configuration is essential for striking a balance between security and debugging ease.

PHP errors not displaying on OVH

 

 

 

 

 

 

 

 

When display_errors is enabled, PHP displays errors in the browser right away. Debugging is made easier because problems are immediately apparent. For fast feedback, many developers leave this enabled while working on a project.

The errors are hidden from the browser when display_errors is set to Off. Instead, if logging is enabled, PHP logs them. For production environments, this is the recommended approach since it keeps users or possible attackers from viewing sensitive information.

Why Displaying Errors Can Be Dangerous?

In a production setting, displaying errors exhibits a significant security risk, even though it can be immensely beneficial during development. Error messages, which are intended for developers rather than users, frequently disclose technical information about your application, such as server paths, database queries, or configuration problems. When this data has been made public, it gives hackers a window of opportunity to examine the architecture and functionality of your application.

An attacker can perform SQL injection, find vulnerabilities, or track down sensitive files by examining these error messages. They may even take advantage of these vulnerabilities in certain situations to obtain complete access to your system. Once inside, they can change important settings, alter how the application behaves, and in the worst case, blacklist your domain from search engines like Google, which will reduce the visibility and trustworthiness of your website.

Also facing the “OVH Site Not Installed” error? Read our quick fix guide: OVH Site Not Installed Error – Causes and Solutions.

Common Reasons display_errors Might Not Work

When you enable display_errors in PHP, your browser should display errors, but occasionally it doesn’t. Usually, a few common errors or server settings cause this.

  • The php.ini file you modified was wrong. You changed /etc/php5/cli/php.ini rather than /etc/php5/apache2/php.ini, for instance.
  • PHP-FPM, which your server is running, does not adhere to php.ini in the same manner as PHP-CGI.
  • By overriding your PHP settings, the.ovhconfig file keeps errors from appearing.

How to Fix the Error?

  1. Download the .ovhconfig file from your hosting root. Change this line:
environment=production

To:

environment=development
  1. Change the.ovhconfig file as follows to make PHP use CGI rather than FPM:
app.engine=phpcgi
app.engine.version=5.4
  1. Add these lines at the top of your PHP file:
ini_set('display_errors', 1);
error_reporting(E_ALL);
  1. Ensure that your php.ini file includes:
display_errors = On
  1. Try editing /etc/php5/apache2/php.ini if modifying /etc/php5/cli/php.ini didn’t work. Next, restart the web server. Usually, that resolves the issue.
  1. In control panels like Plesk, go to:
Home > Subscriptions > [Your Domain] > Customize > PHP Settings

Then set error_reporting to a custom value:
32767

This can work better than E_ALL in some cases.

Need help with VM networking? Check out our guide: OVH Bridge Network Configuration Setup for VMs for a quick and clear setup process.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion 

To sum up, the display_errors directive aids in debugging but ought to be disabled in production to prevent the exposure of private data. Server-specific settings like PHP-FPM or.ovhconfig overrides are often the cause of PHP errors not displaying on OVH. This can be resolved by using the appropriate error reporting settings and modifying the appropriate configuration files for a safe and effective setup.

In brief, our Support Experts demonstrated how to fix the “554 5.7.1 : Relay access denied” error.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Get featured on the Bobcares blog and share your expertise with a global tech audience.

WRITE FOR US
server management

Spend time on your business, not on your servers.

TALK TO US

Or click here to learn more.

Speed issues driving customers away?
We’ve got your back!