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

Php.ini

From TYPO3Wiki
Jump to: navigation, search

{draft}

How to find the php.ini file

General

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.

Howto

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

PHP script:
<?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.


Unix

Using find

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

shell script:
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).

shell script:
locate php.ini

Conventional locations

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

Gentoo

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