Just Host Web Hosting Help

Protecting 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. Log in to your Just Host cPanel account.
  2. Click on File Manager (if prompted, select the checkbox to view hidden files)
  3. Double-click on the public_html folder to open it
  4. Right-click on the .htaccess file and then select the "Edit".
  5. Paste the following code into the bottom of the file and then click save:

<Files php.ini>
          Order allow,deny
          Deny from all
        </Files>
Now your php.ini file is protected. This change prevents php hackers from finding exploits on your site.

Knowledgebase Article 78,476 views bookmark tags: exploit hide php prevent


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article will explain how to run php and other file types using Cron jobs.
Knowledgebase Article 377,397 views tags: cron file jobs php

Script executed with a cron job requires a specific php.ini file to be used.
Knowledgebase Article 110,741 views tags: command cron cronjob crontab custom line optimizer php zend

How do I increase my file size limit in my PHP application?
Knowledgebase Article 439,669 views tags: optimize php upload uploads

Related Help Content

This article will explain how to add a PHP handler to your .htaccess files. This is useful if you want to customize the version of PHP that runs your PHP files.
Knowledgebase Article 139,434 views tags: htaccess php

How can I adjust the php settings specifically for an Addon Domain?
Knowledgebase Article 151,401 views tags: domain php

How do I change the PHP environment for my site with php.ini?
Knowledgebase Article 586,341 views tags: configuration php server

Changing PHP versions, load custom Apache mods, and other Apache/PHP customizations
Knowledgebase Article 55,615 views tags: easyapache php vps whm

This article will outline which PHP PEAR Packages are installed and how you can install additional PHP PEAR Packages.
Knowledgebase Article 99,272 views tags: package pear php

In the newer versions of PHP, they have included a new directive to control and handle remote includes. We disable this option, by default, which may affect some of your PHP scripts.
Knowledgebase Article 92,084 views tags: include php remote url

How do I turn the display_errors flag on for php?
Knowledgebase Article 144,350 views tags: display errors php

This article explains how to enable FastCGI for PHP applications.
Knowledgebase Article 89,907 views tags: fastcgi php