1

How to find PHP Configuration file location in Linux

How to find PHP Configuration file location in Linux, if you are on Linux and want to know the location of PHP configuration file. Then execute these below commands in terminal to get the exact php configuration file or php.ini file. Otherwise create a php file and place phpinfo() function, run this file in browser to get php.ini file location.

1

Using Terminal

Execute these commands in terminal, before that login into linux server. Then use these commands

php -i | grep "Loaded Configuration File"

And Output will be something like this Loaded Configuration File => /etc/php.ini.

2

Creating PHP file

Create a php file and place this below code

<?php phpinfo(); ?>

Run this file from browser, and you can see the php.ini location under: “Loaded Configuration File”.

Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 1 comments
Malas Ngoding

thank you. i need this tutorial to PHP Configuration file location in Linux

Reply

Leave a Reply:

x

Join My Facebook Group to Receive Coding Tutorial for Free

email-subsribe