Locating php.ini File


A critical file you often need to manage is the php.ini file, also known as the PHP configuration file. It controls many import aspects of what you can and can not do with your site, including the size of files that you can upload.

Different hosts use different schemes for storing and accessing files and so you may need to access your php.ini file.

This tutorial will show you how to find the location of the php.ini file on any server.

Create phpinfo.php File

  1. Create a very simple PHP script and place it in your home directory. Using a script editor or a plain text editor (not a word processor) create file called phpinfo.php with this code:
    <?php
    phpinfo();
    ?>
  2. Save the file as phpinfo.php
  3. Upload this file to the document root

Locating php.ini File

  1. In your browser address bar, access the file by typing in: http://<your_domain_name>/phpinfo.php

    phpinfo.php file

  2. You'll get a complete list of all your PHP settings. In the phpinfo.php page you can see:
    • the PHP version at the top of the file.
    • the location of your php.ini file

If you scroll down the page, and you can find the current version of MySQL and PHP settings like register_globals and more.

  • php, configuration file, web script
  • 6 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Related Articles

Create Spam Filters for Mailing Lists

This document explains how to create mail filter rules in cPanel's Mailing Lists interface (Home...

Video: Create Email Filter in cPanel

This video tutorial provides Step-by-Step instructions for creating an email filter in cPanel...

Video: Using Webmail in cPanel

This video tutorial provides Step-by-Step instructions for using Webmail in cPanel Shared Hosting...

Video: Change cPanel Style

This video tutorial provides Step-by-Step instructions for changing the Style settings in cPanel...

Video: Managing Directory Privacy in cPanel

This video tutorial provides Step-by-Step instructions for managing Directory Privacy within a...