Where the PHP configuration file - php.conf (php.ini) - is located on Linux Debian, CentOS/RedHat, and FreeBSD

Practice



We often have to look for familiar configuration files in operating systems that are new to us. For some reason, these files aren't in their usual location.

This note covers the location of the PHP configuration file (php.conf or php.ini) on FreeBSD, Linux Debian/ubuntu, and Linux CentOS/RedHat.


So,

FreeBSD:
/usr/local/etc/php.ini

Note that on FreeBSD it might not exist initially, but there will be php.ini-... files nearby with various configurations, one of which you can simply copy to php.ini

Debian/ubuntu:
/etc/php5/apache2/php.ini

CentOS/RedHat:
/etc/httpd/conf.d/php.conf
or
/etc/php.ini

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)