What is a phpinfo() file
Back to Tips & Tricks (HOW TO)
Question
I need to upload a
phpinfo file, but I do not know what that is or where to get it from.
Answer
You may have read somewhere in this wiki, or at our forum that you should upload a
phpinfo file to your website and see what output it produces.
In simple terms, a phpinfo() file is a single php file that when its run on your website will display all the
various settings of your web hosting server.
Download one
1) Download a copy of the phpinfo file that we have created already
Download
2)
Unzip this file. You should now have a file called
phpinfo.php
3) Upload this to your main web directory in your FTP.
4) You can now load this file in your web browser (example:
http://www.yourdomain.com/phpinfo.php)
Understanding the results
You will now see that this file displays quite a lot of information about your website. You can scroll down the page and look for whatever setting you are trying to find.
In our example screen shot below, we are looking for the
display_errors setting. You will also notice that we are only interested in information that is is the
Local Value column
Result: display_errors = On
How do I change or edit these values/settings
If you are using shared hosting, you will need to contact your webhost so that they can make the change for you
If you have a dedicated server or a VPS, you will need to edit your servers main
php.ini file. For details on how to do this, you will need to contact your server provider as it is beyond the scope of this tutorial.