How to Find the Location of Your php.ini File

A critical file you often need to manage is the php.ini file. It controls many import aspects of what you can and can not do with your site, including the size of files that you can upload.tutuploadsphp.gif

Different hosts use different schemes for storing and accessing files and so you'll need to research where your php.ini file.

This tutorial will show you how to find the location of the file on any server.

Step 1. Create a script to display your PHP information



tutuploadsmedia_1330111995810.png

You'll need to create a very simple php script and place it in your home directory. Using a script editor or a plain text editor (not a word processor) create file called phpinfo.php with this code:

 

<?php phpinfo(); ?>

 

That's all you need. Just one single line. Save the file and call it phpinfo.php.

Upload this file to the public_html directory or whatever your main HTML directory is called.

In your browser address bar, access the file by typing in: https://yourdomain.com/phpinfo.php

You'll get a complete list of all your php settings. In the phpinfo.php page you can see:

  • the PHP version at the top of the file.
  • the location of your php.ini file

If you scroll down the page, and you can find the current version of MySQL. and php settings like safe_mode and register_globals and much much more.

 
 tutuploadsmedia_1330112143774.png

This will work on your local computer using XAMPP or WAMP as well. This is what my XAMPP installation looks like.

  • 226 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

How Do I Clear My Web Browser's Cache?

Each time you access a file through your web browser, it is cached (stored). In this way, certain...

How to Find the URL of a File

If you want to share a web file with friends or the public, you first need to determine the...

Bandwidth Theft

Bandwidth Theft  Even if you expressly ask them not to, some webmasters will try to directly...

Find spam script location with Exim

How does spam get sent from my server? You might have a "tell a friend" feature on your website,...

How do I clear my local DNS cache?

trying to visit a website. In order the speed up this process and reduce the traffic on the DNS...