Here is how to test php installation using a PHP code and command-line option. Testing PHP Installation With a Phpinfo () Create the following test.php script in your /var/www/html directory (or your httpdoc directory) or upload the same using ftp / sftp / scp client:
Because every system is setup differently, phpinfo () is commonly used to check configuration settings and for available predefined variables on a given system. phpinfo () is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.
The phpinfo() function can be used to output a large amount of information about your PHP installation and can be used to identify installation and configuration problems. To run the function, just create a new file called test.php and place it into the root directory of your web server.
By finishing this tutorial, you’ve learned how to create a phpinfo.php file and how to check PHP information via your hosting control panel or your default browser.
Quickly create a phpinfo.php file to diagnose PHP issues, check loaded modules, and verify server configuration. Essential guide for developers.
Check PHP configuration The easiest way to check the PHP configuration, including which modules are installed, is to create a test script using the phpinfo () function.
PHP CLI solution in Windows If you need the phpinfo html without having wampp or xampp or apache, do this in command line (remember the directory you run this command in ie.
Learn how to create a phpinfo() page to retrieve lots of information aboout your environment like version of PHP, extensions in use, EGPCS data, and more.