How do I protect php.ini from publicly being viewed?

Question
How do I protect php.ini from publicly being viewed?
Answer
Add the following code to your site's .htaccess to prevent your php.ini from being viewed in a browser.
<Files php.ini>
Order allow,deny
Deny from all
</Files>
Still need help?
If you need further assistance than this entry provided, please, do open up a support ticket, we are here to help you out
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Why am I getting Server 500 errors with php scripts?

Question Why am I getting Server 500 errors with php scripts? Answer...

What version of PHP are you running?

Question What version of PHP are you running? Answer...

How do I redirect users to another page using PHP?

Question How do I redirect users to another page using PHP?...

How do I use PHP on your host?

Question How do I use PHP on your host? Answer...

Fatal error: Unable to read X bytes in /home/user/public_html/myfile.php on line Y

Question I get this with some of my php files: Fatal error: Unable to...

Powered by WHMCompleteSolution

Our official partners