Turn On PHP error reporting

In a situation I have to turn my hosts php error reporting on from a script. This code really help me installing a old version magento site to new host. I always turn on E_ALL from php.ini but, this is a situation where i can’t access php.ini file so, this works good. ini_set(‘display_errors’,1); error_reporting(E_ALL);