How To Create phpinfo Pages?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-create-phpinfo-pages/
PINTEREST
PINTEREST
INSTAGRAM

PHP is very popular programming language used by a lot of programmers and web devleopers. During PHP application development we may need to get detailed information about the platform the PHP web server runs. This type of information is provided by phpinfo function. phpinfo() function provides information like PATH, User, Operating System, Modules etc.

Install PHP

We will use php command PHP Framework in this tutorial. So we need to install it properly before starting. We can install PHP like below.

Ubuntu, Debian, Mint, Kali:

Fedora, CentOSi RHEL:

Create phpinfo.php Page

We will start by creating a phpinfo wbe page. Actually it is veyr easy to create one. We just use following PHP code to list phpinfo.

Run phpinfo On Apache Web Server

As we know PHP is a dynamic server side language. We need to run PHP code on the server with PHP framework and Web Server Application which is Apache in this case. Put the code described above into the the path /var/www/html

and run following command to start Apache Web Server. But we need to be sure that PHP modules are installed properly.

Or

Run phpinfo On Command Line

If we need to run phpinfo in a more secure and local way we can use command line option which will put the output of the phpinfo page into terminal.

LEARN MORE  How To Create Reverse Proxy with Nginx?

OR

Run phpinfo On Command Line
Run phpinfo On Command Line

Run phpinfo On From Commmand Line with Php Web Server

We can also create a temporary web server which will serve the phpinfo web page. We will use again the php command. We will also provide the IP address and port number we want to run web server.

Run phpinfo On From Commmand Line with Php Web Server
Run phpinfo On From Commmand Line with Php Web Server
Run phpinfo On From Commmand Line with Php Web Server
Run phpinfo On From Commmand Line with Php Web Server

WordPress phpinfo Plugin

If we are running a CMS like WordPress we have options which is more practical then creating a web page and serve it. WordPress provides the PHPINFO plugin from the following link.

WordPress phpinfo()

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-create-phpinfo-pages/
PINTEREST
PINTEREST
INSTAGRAM