Skip to content

Wrong version. #1759

Closed
Closed

Description

@jckonczal

Affected Page URL

https://www.php.net/downloads.php?usage=web&os=windows&osvariant=windows-downloads&version=default

Describe the bug

After installing and running PHP, the wrong version is reported.

Steps to reproduce

  1. Download php-devel-pack-8.5.1-nts-Win32-vs17-x64.zip.
  2. Unpack and install it.
  3. Modify the Path to include the location of the new installation.
  4. Open a new a shell window.
  5. Execute "php -v".
  6. Observe the wrong version reported:

PHP 8.5.0 (cli) (built: Nov 21 2025 13:38:22) (NTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Built by Beyond Code for php.new
Zend Engine v4.5.0, Copyright (c) Zend Technologies
with Zend OPcache v8.5.0, Copyright (c), by Zend Technologies

Expected behavior

I expected version 8.5.1 to be reported, about like this:

PHP 8.5.1 (cli) (built: Dec 16 2025 [time]) (NTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Built by Beyond Code for php.new
Zend Engine v4.5.1, Copyright (c) Zend Technologies
with Zend OPcache v8.5.1, Copyright (c), by Zend Technologies

Screenshots

No response

Additional context

No response

Activity

  1. shivammathur commented on Jan 9, 2026

    @shivammathur
    Member

    @jckonczal

    Please download using the link that says "Zip" on the downloads page and extract it instead of the devel pack.
    For 8.5.1, it is https://downloads.php.net/~windows/releases/archives/php-8.5.1-nts-Win32-vs17-x64.zip

    Also, make sure the location of 8.5.1 is added before the location of 8.5.0 in the PATH that is loaded in your shell.

  2. jckonczal commented on Jan 9, 2026

    @jckonczal
    Author

    Sorry, in my haste to finish up for the day, I copied and pasted the wrong location in the steps to reproduce the problem. I did download and install https://downloads.php.net/~windows/releases/archives/php-8.5.1-nts-Win32-vs17-x64.zip, and I changed my PATH to include the new version. The only other PHP version on my computer is 8.3.6.

  3. jckonczal commented on Jan 9, 2026

    @jckonczal
    Author

    @shivammathur

    Thanks for your help. There was a version 8.5.0 that I wasn't aware of installed by another tool. The PowerShell command "get-command php" helped me see that it was the one that was being run instead of the newly installed 8.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions