Where can I find php.ini?
Where can I find php.ini?
554
14-Jul-2023
Aryan Kumar
15-Jul-2023The location of the
php.inifile depends on your operating system and how PHP is installed on your system.Windows
On Windows, the
php.inifile is typically located in one of the following locations:C:\Windows\php.iniC:\php\php.iniC:\Program Files (x86)\PHP\php.iniLinux
On Linux, the
php.inifile is typically located in one of the following locations:/etc/php/php.ini/etc/php5/php.ini/etc/php.d/php.inimacOS
On macOS, the
php.inifile is typically located in one of the following locations:/etc/php/7.4/php.ini/etc/php/7.3/php.ini/etc/php/7.2/php.iniIf you are not sure where the
php.inifile is located on your system, you can use thephpinfo()function to display the location of the file.To do this, open a web browser and navigate to the following URL:
This will display the
phpinfo()page, which will include the location of thephp.inifile in the Configuration section.