To prevent people to viewing your php.ini file via a browser a few lines need to be pasted into the .htaccess file.
- Login 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 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.
Keywords: php.ini php exploit