How to force error_reporting mode in PHP 5.3

I have code encrypted with ioncube and it is also written for <PHP 5.3. There is a ton of outdated code that will still work, but there are error messages throughout the site.

Is there any way to externally force error_reporting to E_ALL ^ ​​E_DEPRECATED or the like? I am sure of the code that they hardcode on E_ALL for some reason.

+6
php deprecated ioncube
source share
2 answers

He returned to PHP 5.2 and avoided the problem.

+1
source share

Disable display_errors and write them to a file. This is the standard procedure for any production website.

In the Apache configuration file php_admin_value error_reporting X should be impossible to override the user code, where X is the integer value you want.

In addition, set_error_handler() can be useful if you want to perform some execution checks.

+1
source share

All Articles