Create a phpinfo file

A php info file is one that gives you a wealth of information on your installation.

To create the file, open notepad and enter the following code in it.


// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

Save the file as phpinfo.php and upload it to the root of your site so that it is accessible through the browser. Access the phpinfo.php file from the browser and if all is well with your php installation, you should see a page with all the crucial information on it.

Amongst the important information that you can get are:

– location of the php.ini configuration file
– status of the various configuration options
– php version
– mysql version
– extensions enabled/ disabled
– location of the server’s root

One thought on “Create a phpinfo file

Leave a Reply

Your email address will not be published. Required fields are marked *