How Do I Create a PHPinfo Page?
Sometimes it is necessary to find out more information about the version of PHP your server is running. All versions of PHP come with a very simple and endlessly useful information function:
phpinfo();
Calling this function inside a PHP page will output a full profile of the current state of PHP on your site. This can provide information you need to install scripts and write your own, and in some cases save you time e-mailing your us to ask about your PHP capabilities or paths. Output will include information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.
To create a phpinfo file:
1. Open up a simple text editor like Notepad or Textpad (not Microsoft Word or similar).
2. Paste in the following PHP code:
<?php
phpinfo();
?>
3. Save the file as phpinfo.php.
4. Upload to the webserver. Put it in your public_html directory.
You can also create this file from the file manager in your control panel
Make sure to remove the file when you are done with it, hackers may use it to glean information about the server.
If you want to change the version of PHP, from 4 to 5, log in to your control panel and click on the PHP Configuration icon.
Category: Knowledgebase
Created on: December 23rd, 2009




