The phpinfo.php is a kind of file that allows you to watch the information about your dedicated server. The phpinfo file doesn’t consists of the MySQL information, but it holds all the version information about the PHP, Apache/IIS, GD and many other things on your server. Most of the times you will see many important settings details in the phpinfo file, which might be causing some issues with the installations.
There are many other things that can be seen using the phpinfo file, such as: current version, path to php.ini file, operating system version, hostname, timezone of your system, server API, path to local php.ini file, configuration options such as log_errors, register_globals, post_max_size, memory_limit, safe_mode, etc… In addition to this, the phpinfo file will show you the active modules which are loaded with PHP and its existing configuration settings.
The phpinfo.php file is a simple php script and could be created and stored anywhere on your dedicated server.
Step 1: In order to create a phpinfo file, simply open a plain text file and add the following single line to it and save the file as phpinfo.php .
<? phpinfo(); ?>
Step 2: That’s all you need, now simply upload the created file to your web server. You should upload the file to the exact destination you want to test. Usually, it will be your public_html folder, although its upto you. You can even upload the file to any subdirectory on your server. Use your favourite FTP client to upload the file.
Step 3: In order to visit the page in your browser, simply type the destination url where you have uploaded the file. Here in this tutorial we have added the file in the public_html directory so, the url would be as shown below:
Make sure you replace your sitename with “yourdomain”.
That’s it ! Now you can view all the information about PHP for your dedicated server for that specific directory.