Knowledgebase:
PHP info
Posted by - NA -, Last modified by on 11 March 2010 05:09 AM
  • How PHP is compiled in the server?

  • What is the version of PHP in your server/domain ?

  • What are the php configuration or variables set for your server/domain?


You can use the function phpinfo() to know the PHP details.

The phpinfo file outputs a large number of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP enviromment, OS version information, paths, master and localvalues of configuration options. HTTP headers etc.

Because every system/server is set up differently, phpinfo() is commonly used to check configuration settings and for available predefined variables on a given system/server.


How to create a phpinfo file?

1) Open any simple text editor like notepad.

2) Copy and paste the following one line code:

<?php phpinfo() ?>

3) Save the file as phpinfo.php

4) Upload the file to the desired directory ( cpanel -> under public_html folder, plesk--> under httpdocs folder) using FTP clinets or File manager softwares.

5) Access the file with your browser to the location of the site where you uploaded your phpinfo.php file. Ex: http://domain.com/phpinfo.php


For more information on phpinfo() function, see the PHP manual http://php.net/phpinfo








(735 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).