Open In App

What is the purpose of php.ini file ?

In this article, we will learn about the purpose of the php.ini file. At the time of PHP installation, php.ini was a special file provided as a default configuration file.
Purpose

Note:



 

To check the file path, use the following program:

<?php

echo phpinfo();

?>

Note: Keys in the file are case-sensitive, keyword values are not spaces and lines starting with a semicolon are ignored. The file is well commented on. The Boolean values are represented by On/Off, 1/0, True/False, Yes/No.

The file contains a set of directives with a set of respective values assigned to it. The values can be a string, a number, a PHP constant, INI constants, or an expression, a quoted string or a reference to a previously set variable. Expressions in the INI file are limited to bitwise operators or parentheses. Settings with a particular hostname will work under that particular host only.

Environment variables of php.ini file:

Important settings or common parameters of the php.ini file:

Configuration of php.ini file: Whenever we install PHP, we can locate the configuration file inside the PHP folder. If using xampp, we can find the configuration file in one or many versions, inside the path ‘\xampp\php’.

Note: Other versions of this file are php.ini-development and php.ini-production. The most preferred one is the php.ini-development file.

Article Tags :