How to Find php.ini File in Ubuntu?

By Hardik Savani May 14, 2024 Category : Ubuntu

Hi Folks,

Here, I will show you how to work how to find php.ini file in ubuntu. you will learn how to get php.ini file in ubuntu. In this article, we will implement a how to get php.ini file path in ubuntu. This post will give you a simple example of ubuntu php.ini file location.

There are two commands to find the location of your php.ini file in ubuntu. we will use php -i | grep php.ini and php --ini commands to get php.ini file path in ubuntu.

You can use this command with your ubuntu 22.10, ubuntu 22.04, ubuntu 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.

Example 1:

Command:

php -i | grep php.ini

Output:

Example 2:

Command:

php --ini

Output:

I hope it can help you...

Tags :
Shares