What Is a php.ini File and Its Use

What Is a php.ini File? As all, we know PHP is an open-source scripting language which means we can modify PHP configuration according to our use. So, the php.ini is the main configuration file of PHP where we used to modify the execution time, upload file size, and much more.

PHP INI file is created at the time of PHP installation. If you install XAMPP there is also an auto-generated PHP INI configuration that we use to set up the maximum upload size for our PHPMYADMIN database.

Use of PHP INI File

Here is a list of major use of the PHP INI configuration file.

  • By using INI configuration file we can increase PHPMyAdmin DB Import Size.
  • We can maximize execution time of PHP files or prevent timeout issue (max_execution_time).
  • It is use for disable error reporting like PHP error notices and warnings (error_reporting).
  • Also we can enable and disable file upload functionality by using PHP INI configuration (file_uploads).
  • Set memory limit for PHP scripts which allow script to take defined memory (memory_limit).

Example of PHP.INI File

In this example, I will show you how you can increase your upload size limit,

Please note that after you do these changes you have to restart your servers.

php.ini File Location In XAMPP

your_drive/xampp/php/php.ini

Go to your installation directory then find the folder named xampp. Now check the path which I show you above.

How to Create php.ini File

You can also create a PHP.INI file to your project root directory to override the setting of the default configuration.

To create a php.ini file, you just create a file name with php.ini and set your configuration as suggested in the above example. And then save it.

php.ini File Location in cPanel

php.ini file location in cpanel
  1. Open your cPanel and search of MultiPHP INI Editor.
  2. You get the same, now click on it and select the version of PHP from dropdown.
  3. You get you configuration page where you can modify the values according to your use.
basic setting of PHP ini configuration

Here is the complete guide for the PHP INI configuration file and its use with example.

Please let the comment below if you get any issues.

To know more about PHP configuration you can check here https://www.php.net/manual/en/configuration.file.php.

Also Read:

Happy Coding..!

Was this article helpful?
YesNo
My name is Bikash Kr. Panda. I own and operate PHPCODER.TECH, my native place in Odisha. I am a Web Programmer by profession and working on more than 50 projects to date. My passion is working on the web-based project using PHP and relate to all CMS and frameworks which is based on PHP.
Posts created 178

One thought on “What Is a php.ini File and Its Use

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top
mariobet - supertotobet - escort - milanobet giriş - gizabet giriş -
perabet giriş
- betkanyon giriş -

jojobet giriş

We are now accepting guest posting and creation of back-links.
This is default text for notification bar