Check Configuration Of Installed PHP In Your Server

So, you are hosting your PHP project via your server or the hosting provider. Well, then there are lots of configuration settings in the installed PHP on your local or remote server, which can limit your access to many of the things, such as upload size limit and maximum execution time limit for certain script to work for your site. So, you might want to check the PHP configuration of your server? Is it really possible? Well, it is possible and in order to check the configuration of the PHP installed in your server or the hosting provider, you just have to add the given code in your file and check it, which is below:

What the above code does is, it displays all of the configuration settings of PHP that are currently in your local or remote server, from which you are viewing your site. It also displays where certain files is located, for eg. Loaded Configuration File is located in C:\xampp\php\php.ini(in the case of our server, but, your might be in different location than ours), also some of the functions are enabled or not for the PHP execution, for eg. output_buffering is set to 4096 in our development system, etc. Also, if you would like to change any of the settings provided by the server for PHP, then, you have to first search the required information from here, ie, the displayed result after execution of the above code from your server, and then, later on modify as your need by knowing that information from there, using the provided code above. For the information, the main configuration file for the PHP configuration setting lies in the php.ini file.

phpinfo

The above image shows some of the configuration settings of our installed PHP in our local server using xampp. But, in your case, this might be totally different. So, you need to check all of those and then modify it properly for your site.

Note: If you modify any of the code in the file php.ini, then, you might need to restart your server, since, the change will not work at all until the server is restarted.

, , , , , , , , , , , ,

Post navigation

Bishal Napit

Bishal Napit is a WordPress theme developer from Tansen, Palpa, with a passion to learn more on WordPress.

Leave a Reply