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

Refers to:

  • Plesk for Linux

Created:

2016-11-16 13:06:18 UTC

Modified:

2017-02-19 11:19:23 UTC

2

Was this article helpful?


Have more questions?

Submit a request

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

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.

Have more questions? Submit a request
Please sign in to leave a comment.