views:

47

answers:

1

I have some code that's encrypted with ioncube and it's also written for < PHP 5.3. There's a ton of deprecated code, which would still work, but there's error messages all over the site.

Is there a way of externally forcing error_reporting to E_ALL ^ E_DEPRECATED or similar? I'm sure in the code they're hardcoding to E_ALL for some reason.

+1  A: 

Disable display_errors and log them to a file instead. That is standard procedure for any production web site.

In an Apache config file, php_admin_value error_reporting X should make it impossible to be overridden by user code, where X is the integer value you want.

Also, set_error_handler() might be of use if you want to do some runtime checks.

konforce
Noodles
Are you able to trap them with `set_error_handler()`?
konforce
I think the application I'm using already sets an error handler. I ended up rolling back to PHP 5.2 so the application would work. Thanks for your help anyway.
Noodles