Basic PHP Programming Question:

How To Check Your PHP Installation?

Tweet Share WhatsApp

Answer:

PHP provides two execution interfaces: Command Line Interface (CLI) and Common Gateway Interface (CGI). If PHP is installed in the php directory on your system, you can try this to check your installation:

* Run "phpphp -v" command to check the Command Line Interface (CLI).
* Run "phpphp-cgi -v" command to check the Common Gateway Interface (CGI).

If you see PHP printing the version information on your screen for both commands, your installation is ok. Open a command window and run the commands below:

C:>phpphp -v
PHP 5.2.2 (cli) (built: May 2 2007 19:18:26)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0 Copyright (c) 1998-2007 Zend Technologies

C:>phpphp-cgi -v
PHP 5.2.2 (cgi-fcgi) (built: May 2 2007 19:18:25)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0 Copyright (c) 1998-2007 Zend Technologies

Download PHP PDF Read All 139 PHP Questions
Previous QuestionNext Question
How To Download and Install PHP on Windows?How To Download and Install PHP for Windows?