To prevent people viewing your php.ini file via a browser, a few lines need to be pasted into the .htaccess file.
- Log in to the cPanel
 - Click on "File Manager"
 - Open the public_html folder (click on the folder icon next to public_html)
 - Click on .htaccess and then select the "Edit File" option on the right hand of the window
 - Paste the following code into the bottom of the file:
Order allow,deny
Deny from all - Click "Save"
 
Now your php.ini file is protected, which can help php crackers from finding exploits on your site.
