Locating php.ini file

A critical file you often need to manage is the php.ini 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'll need to research where your php.ini file.

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

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(); ?>

Save the file as phpinfo.php. Upload this file to the public_html directory.

In your browser address bar, access the file by typing in: http://yourdomain.com/phpinfo.php

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 safe_mode and register_globals and more.




Was this answer helpful?

 Print this Article

Also Read

Modify Server Hostname Using SSH in CentOS

.Change the hostname on a running system On any Linux system, the hostname can be modified using...

Create Alias Domain in cPanel

This article outlines how to create an Alias Domain in cPanel Adding a Domain Alias To add a...

Removing cPanel Accounts with /scripts/removeacct Script

The /usr/local/cpanel/scripts/removeacct script terminates cPanel accounts from the command line....

How to Generate/Download a Full Backup in cPanel

A full backup is a backup of all of your entire cPanel Shared Hosting account (files, email,...

How to Upgrade a Dedicated Server

This article demonstrates the steps for upgrading your dedicated server package.Changing business...