Add to Favourites Add to Favourites    Print this Article Print this Article

Where is my php.ini?

A new and easy trick to find your php.ini would be to ask php itself what it's using, eg:

/usr/local/bin/php --ini | grep 'Loaded Configuration File'

which does assume that the php output will be in English.



Usually your php.ini will be located at (XX - PHP version, for example 73):

/usr/local/phpXX/lib/php.ini




CustomBuild 2.0 installs will also uses the php.conf.d directory to load miscellaneous .ini files into php.  The files that CustomBuild will create are:

/usr/local/php74/lib/php.conf.d/10-directadmin.ini
/usr/local/php74/lib/php.conf.d/50-webapps.ini


You can add your own files there if you need to add settings or load modules into php, for example:

/usr/local/php74/lib/php.conf.d/11-custom.ini




Was this answer helpful?

Also Read