Help Center> CodeArts Deploy> FAQs> Custom Application Actions> Installing Python> Software Version Detected on Windows Host Does Not Match the Installed Version
Updated on 2023-03-04 GMT+08:00

Software Version Detected on Windows Host Does Not Match the Installed Version

Symptoms

The following uses PHP as an example. The PHP version to be installed is php-7.2.12.

After PHP is installed successfully, log in to the host as the user who verified the host connectivity to view the PHP version.

The detected PHP version is PHP 5.6.38 or another version, which does not match the installed version.

Cause Analysis

If another version of PHP has been installed on the host, the path of the new PHP will be added to the end of the Path variable when you install PHP again. The host searches for a program command based on the paths in the Path variable from the beginning to the end. The program command in the original PHP path is found prior to that in the new path. As a result, a version mismatch problem occurs.

If the program command is found in the C:/php2 path, the host will not continue to search for the command in the C:/php path.

Solution

The solutions for user and system environment variables are the same. The following uses user environment variables as an example.

  1. View the environment variable Path.
    1. Right-click My Computer, and choose Properties from the shortcut menu.

    2. Click Advanced system settings.

    3. Click Environment Variables.

    1. View the variable Path.

  1. Perform either of the following operations:
    1. If the variable Path does not contain any references such as %PHP_HOME%, delete all paths related to PHP or place the new PHP path in front of other paths.
    2. If the variable Path contains references such as %PHP_HOME%, find the environment variable PHP_HOME and change its value to the new PHP path. Then the reference variable will be first matched when the host searches for a PHP path.

Installing Python FAQs

more