How to check your php settings by using or adding a phpinfo file

The phpinfo() function is used output the information about all the php settings of a sever. To use this function for viewing or checking the php settings you need to create a file named “phpinfo.php”

Mainly the phpinfo file is used to check the php configuration settings and currently running php functions on the server if any like php Crons(scheduled tasks) etc.

Note: For security reasons, it is necessary to disable the phpinfo() function as hackers or unauthorize users can see the php settings of your server.

How to create a phpinfo file in your cPanel:

For creating a phpinfo file in your cPanel please follow the below mentioned steps:

1) Login to your cPanel.

2) Scroll down to Files section and click on “File Manager” icon.

File Manager in cpanel

After clicking on File Manager you will be redirected to a page where a list of files and folders in your hosting account is visible on screen.

3) Now you need to navigate to public_html folder .

4) Now navigate to top navigation bar and click on New File and create a new file with the name “phpinfo.php” or “info.php”.

5) Now select the phpinfo.php file and click on edit and enter the below code into it.




After entering the above code click on save for saving the changes in the file.

How to access the phpinfo file

For accessing the phpinfo file please follow the below mentioned steps:

1) After creating the phpinfo file in the cPanel, you can access this page by entering on your browser .

2) Now you can see all the php configuration settings of your server. To check a specific setting or function that is disabled or enabled you can simply type ctrl+f
and enter the function name you want to search.

By this way you can search a particular php setting or function which is disabled or enabled on your server.