Linux Server Administration Tips PHP Tips & Tutorials

Where is php.ini located?

Well it depends on the Linux distribution you are using, the version of php and the way you install it with Apache web server. Php.ini may be here:


Or here:


Or here:


Anyway, you can always find any file named php.ini in this manner

find / -name php.ini

The simplest yet most powerful usage of the renowned find command. By its help I was able to locate the php.ini on my Ubuntu 9.04 Apache2 and PHP5:


Use phpinfo() to find out

Write a simple PHP file with the following content:

<?php phpinfo();

And upload it to your server and access it in your web browser to get a page like this:

PHP configuration file php.ini path
PHP configuration file php.ini path

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Shoot me a message.

13 replies on “Where is php.ini located?”

almost an hour i’m looking for that php.ini file. I know the path of that file, but where should i go?? i got hosting, not server, maybe this is not right?

i wanna ask them question . it.s no easily so why? tel information about that .remember i have to it

Comments are closed.