How to Tell If PHP Is Running in CGI Mode?

The "phpinfo()" function lets you run a script on a PHP server to identify if the server runs in CGI mode. CGI is an older form of execute that let you run scripts on a Web server. You must create a PHP file that contains the phpinfo function on your Web server. The server returns a response that includes a Server API section that tells you if the server runs in CGI mode.

Instructions

    • 1

      Select the Windows Start button and type "notepad" in the search text box. Press "Enter" to open the Notepad text editor.

    • 2

      Type the following code in the file:

      <?php phpinfo() ?>

    • 3

      Click the "File" menu item and select "Save." Type "info.php" in the File Name text box. Select "All Files" from the drop-down box. Click "Save" to save the file.

    • 4

      Upload the file to your Web host server. The server information is included with your Web host account. Upload the file to the root directory on your server.

    • 5

      Open a Web browser and type your domain name and the file "info.php" in the address text box. A list of information displays. Review the section labeled "Server API" to identify if the PHP engine runs in CGI mode.

Related Searches:

References

Comments

Related Ads

Featured