All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh


From TYPO3Wiki
Jump to: navigation, search


How to find the php.ini file


The most simple and portable way to find the php.ini file that's actually being used is to use phpinfo().

Since there may be more than one file named info.php, this avoids the case where you edit a info.php that is not really used by PHP.


Create a file in your web root (for example info.php) with this content:

<?php phpinfo();

Now open this page in your browser, and look for the line Configuration File (php.ini) Path in the first block of output telling you which php.ini is loaded.


Using find

You can use the find program to find all the php.ini files on your system.

find / -name "php.ini"

Using locate

You can use the locate program to find all the php.ini files in the locate database (which may not always be up to date).

locate php.ini

Conventional locations

As with most configuration files, php.ini should reside in /etc.


Example locations:

  • /etc/php/apache2-php5.2/php.ini
  • /etc/php/apache2-php5.3/php.ini
  • /etc/php/cgi-php5.3/php.ini
  • /etc/php/cli-php5.3/php.ini
  • /etc/php/fpm-php5.3/php.ini