Getting Information about PHP Installation
PHP provides phpinfo() function that prints details about your PHP installation. It can be helpful when you want to know about a certain setting like the location of php.ini file.
Copy following code to a file located in your web server and run it in your web browser.
<?php phpinfo(); ?>
You will be able to see tabulated information about your php installation. Usually a file like this is used as a test file to check that PHP is up and running.
- First you will be able to see your PHP version.
- Configuration File (php.ini) Path shows where is your php.ini located. PHP may keep a separate php.ini file for command-line. This setting shows the location of php.ini file that corresponds to your web server (the one you will use most).
- Under date section, you will find the timezone used by PHP.
- For many PHP extensions installed, there would a table listing extension details.