How To Find Your PHP.INI

By Angsuman Chakraborty, Gaea News Network
Wednesday, November 16, 2005

I often come across this question: Where is my php.ini located? Here is a simple solution.

To find out which php.ini your apache server is using please follow the steps below:

1. Type in the following in a file named say test.php and save it in document root of your webserver, normally htdocs for apache:

<?php phpinfo(); ?>

2. Load the file in your browser. For example if you access your home page like:
http:/// then you will access this file as http:///test.php

3. Search for php.ini in the response text. On that line you will find the full path to your php.ini

Filed under: How To, PHP, Tech Note, Web, Web Services
Discussion

G
March 9, 2010: 1:02 pm

So simple… and I’ve been looking for it for about an hour!
Thank you!


Brindly
June 16, 2009: 8:59 am

I need the complete reference of php.ini file…

can anyone help me..

please send it to my email.

Thank you…


Pankaj
December 6, 2006: 7:33 pm

facing problem in file attachment upload in any browser. Please seggest me the solution.

November 16, 2005: 11:43 pm

[...] 1. Open php.ini (How to find it?) 2. Search for zend.ze1_compatibility_mode 3. Change it to Off as shown below zend.ze1_compatibility_mode = Off 4. Save php.ini and restart Apache [...]

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :