How do I prevent the php.ini file from being viewed?
To prevent people to viewing your php.ini file via a browser a few lines need to be pasted into the .htaccess file.
1) Login to the cPanel
2) Click on File Manager
3) Open the public_html folder (click on the folder icon next to public_html)
4) Click on .htaccess and then select the "Edit File" option on the right hand of the window.
5) Paste the following code into the bottom of the file and then click save:
Deny from all
Now your php.ini file is protected and which can help php crackers from finding exploits on your site.