what is php.ini

php.ini is a configuration file which controls execution of the php program - it also control modules supported eg: mysql module which is needed to connect php code with mysql database. php.ini should configured in the way that matchs with enviroment ( production or development ) where its going to used.

While executing a php code PHP attempts to find and load this configuration from a number of locations.The following is a summary of its search order:

  • The Directory in which webserver is installed
  • The Directory in which PHP is installed
  • Present working directory ( while suphp is enabled)
  • The directory specified during the compliation time ( --with-config-file-path )

A sample php.ini file will created while installing php. You can edit that file if you need to enable / disable any funtionality of your code. If you are really advancted user or server administartor then there will be suition to edit the php.ini file.

Each configuation option in php.ini are explained indetail in further pages of our website