Article ID: 1447, created on Oct 6, 2008, last review on Dec 3, 2014

  • Applies to:
  • Plesk for Linux/Unix

Question

Where are php.ini configuration files located on the Parallels Plesk server?

Answer

Usually the php.ini location is /etc/php.ini . PHP modules *.ini files are placed in /etc/php.d .

Using the following command location of configuration files may be found:

# php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File:         /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed:      /etc/php.d/00-ioncube-loader.ini,
/etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/imap.ini,
/etc/php.d/json.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_pgsql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/pgsql.ini,
/etc/php.d/phar.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zend_extensions_psa.ini,
/etc/php.d/zip.ini

It can be found which configuration file is used by PHP by using a script with the phpinfo(); function:

# cat /var/www/vhosts/domain.tld/httpdocs/info.php
<?php phpinfo();?>

Open a page which contains this PHP code and review the "Configuration File (php.ini) Path", "Scan this dir for additional .ini files" and "additional .ini files parsed" sections at the beginning of the page.

Since Parallels Plesk 10 it is possible to set up php.ini per-domain for each domain which is running PHP scripts as a CGI of FastCGI application. In this case it should be located in ${VHOST_DIR}/<domain>/etc/ directory to be recognized by PHP interpreter.

Search Words

The file index.php is part of Plesk distribution. It can not be run outside of Plesk environment

The file index.php is part of Plesk distribution. It can not be run outside of Plesk environment

custom php

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 29d1e90fd304f01e6420fbe60f66f838

Email subscription for changes to this article
Save as PDF