This step by step is to change and manage the PHP variables in a specific directory in your hosting account, the changes will affect only the script running in the specific directory. If you are looking to make changes to affect all the PHP scripts running in your hosting account , please check THIS tutorial in our knowledgebase about How to change php variables values in my hosting account.
To change PHP variables on scripts running specifically in a directory, you should create or edit (if exists) the .htaccess file in the desired directory and add the php flag line on it.
Here is an example to turn ON and OFF certain variables<IfModule lsapi_module>
php_flag register_long_arrays On
php_value register_globals On
php_flag display_errors Off
</IfModule>
This option is available in all our shared cPanel hosting accounts.