php.ini file location



Question

I am using the xampp server for PHP development and I want to edit the php.ini file; where can I locate it?

Answer

The php.ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits.

Windows:

For Windows, you can find the php.ini file in the C:\xampp\php\php.ini folder:



macOS, OS X:
/private/etc/php.ini


Linux:
/etc/php.ini 
/usr/bin/php5/bin/php.ini 
/etc/php/php.ini 

Comments