• PHP: Hypertext Preprocessor

    • Home
    • Downloads
    • QA Releases
    • Snapshots
    • Team
    • PHP.net site
    • PHP For Windows

      This site is dedicated to supporting PHP on Microsoft Windows. It also supports ports of PHP extensions or features as well as providing special builds for the various Windows architectures.

      If you like to build your own PHP binaries, instructions can be found on the Wiki.

      PECL For Windows

      PECL extensions for Windows is being worked on. Windows DLL can be downloaded right from the PECL website.

      The PECL extension release and snapshot build directories are browsable directly.

      Which version do I choose?


      IIS

      If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.

      Apache

      Please use the Apache builds provided by Apache Lounge. They provide VC15 and VS16 builds of Apache for x86 and x64. We use their binaries to build the Apache SAPIs.

      With Apache, using the apache2handler SAPI, you have to use the Thread Safe (TS) versions of PHP.

      VC15 & VS16

      More recent versions of PHP are built with VC15 or VS16 (Visual Studio 2017 or 2019 compiler respectively) and include improvements in performance and stability.

      - The VC15 and VS16 builds require to have the Visual C++ Redistributable for Visual Studio 2015-2019 x64 or x86 installed

      TS and NTS

      TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).

      What is PGO?

      Profile Guided Optimization is an optimization feature available in Microsoft's Visual C++ compiler that allows you to optimize an output file based on profiling data collected during test runs of the application or module.

      Links:

      • PGO on MSDN
      • Visual C++ Team Blog - PGO with PHP
      • PHP PGO build for maximum performance (old)

      amd64 (x86_64) Builds

      PHP 7 provides full 64-bit support. The x64 builds of PHP 7 support native 64-bit integers, LFS, 64-bit memory_limit and much more.

      x64 builds are recommended (almost all Windows installations support x64).

      Long and multibyte path

      PHP 7.1+ supports long and UTF-8 paths. See the manual for details.


      Archives

      Past releases are available from our archives, older versions not found there can be found at the Museum.

    • Missing PECL DLLs

      17 Oct 2022

      You may have already noticed that DLLs for new PECL releases are no longer available for several months. This is because the Windows PECL build machine died, and the team is still working on the long term plan of building DLLs for PECL extensions with a new CI process. We're doing our best to finish that as soon as possible, and keep you up to date.

      PECL DLLs for PHP 8.1

      02 Dec 2021

      A week ago PHP 8.1.0 has been released and you may be eager to try it out, but you need one or more PECL packages for which there are no PHP 8.1 binary packages available yet, and you may wonder when these will be made available. Well, the PHP for Windows team does not want to provide possibly premature binary packages, so as usual, we will wait until late January or early February to trigger the mass build for all applicable PECL packages; that is, after PHP 8.1.2 has been released, what is currently scheduled for January, 20th. After the builds have been done, you can download the binary packages from pecl.php.net as usual.

      Waiting for two months is no option for you? In that case you can download snapshot builds of some of the PECL packages. If there is no snapshot for your package available, consider to contact the team and to request that a snapshot for that package is being build. Note though, that these snapshot builds are not recommended for production. However, testing these and reporting issues is very welcome!

      Where are the PECL DLLs?

      11 Oct 2021

      You may have noticed already that Windows DLLs are no longer available on PECL. Since the PHP for Windows team has no access to that machine to debug the problem, the best we could do is to file a respective bug report, and to hope that it will be fixed in a timely manner.

      Anyhow, we keep building and monitoring the build results of all PECL packages for Windows. And you can download the DLLs from our server. Sorry for the inconvenience!

      PS: this issue has been resolved!

      libjpeg dependency

      14 Jul 2021

      As of PHP 8.1.0, the official Windows dependencies use libjpeg-turbo instead of libjpeg. The main reason is that libjpeg-turbo offers better performance, because it uses SIMD instructions on supported platforms (Windows x86 and x64 are supported). Note that many Linux distributions already use libjpeg-turbo for quite a while.

      This is relevant for the GD extension, but may affect other extensions as well. Please file a bug report, if you experience any problems regarding this change.

      PHP 8 Snapshot Builds

      06 Jun 2021

      You may have already noticed that we didn't provide snapshot builds for PHP 8 for many months. There are no plans to change that, but users can get third party provided nighly builds.

      We will, of course, continue to provide Windows builds of all PHP (pre-)releases. So watch out for the release of PHP 8.1.0alpha1, scheduled for 10 Jun 2021!

      OCI DLLs missing from PHP 8.0.0 pre-release builds

      09 Aug 2020

      Due to a build system error which only has been noticed recently, so far the PHP 8.0.0 pre-release builds didn't contain php_oci8_12c.dll and php_pdo_oci.dll in the ext/ folder. You can now separately download these files and copy them in your existing PHP-8.0.0beta1 installation (the DLLs are not suitable for the alpha releases). Make sure that you use the appropriate package (x64 vs. x86, and non thread-safe vs. thread-safe).

      Windows Defender Warnings

      07 Aug 2020

      A few days ago, we have noticed that Windows Defender reports some files in the PHP source and test packages as severe threat, claiming they would constitute a backdoor (e.g. Backdoor:PHP/Dirtelti.MTF). These files are auxiliary test files containing eval statements. Are these files backdoors? That depends on the context, i.e. in this case whether they are accessible via the Web. If they are, because they have been uploaded to the webroot of a publicly available Webserver, for instance, they may pose a serious threat. On the other hand, if they are just used on a local machine for development and testing purpuses, they are not malicious in any way.

      So, if you experience such Windows Defender warnings, examine the reported files, make sure they don't pose any threat, and then unblock them.

      Happy PHPing on Windows!

      OpenSSL default config path changed

      08 Oct 2019

      As of PHP 7.4.0, the OpenSSL default config path changes from c:\usr\local\ssl\openssl.cnf to C:\Program Files\Common Files\SSL\openssl.conf for x64 builds, and C:\Program Files (x86)\Common Files\SSL\openssl.conf for x86 builds. These paths match the defaults of OpenSSL 1.1, and are more inline with the Windows folder structure than the old settings. Note that this path is still configurable via the environment variable OPENSSL_CONF. See also the installation section in the PHP manual.

      PHP 7.4 builds use Visual Studio 2017

      21 Aug 2019

      We used Visual Studio 2019 to build the early releases of PHP 7.4 (up to and including 7.4.0beta2). And although Visual Studio 2019 is generally an improvement over Visual Studio 2017, due to compatibility issues we have decided to switch back to Visual Studio 2017 for our PHP 7.4 builds, and we are planning to stick with this for the complete lifetime of PHP 7.4.

      Note that it is still possible to use Apache VS16 builds from Apachelounge in combination with PHP 7.4, since VS 2019 is forward compatible with VS 2017.

      Our master snapshots are still built with Visual Studio 2019, and we are planning to stick with Visual Studio 2019 for PHP 8.0.

      Visual Studio 2019 Builds

      04 Jun 2019

      All binary packages we were offering contained "vc#" (for instance, "vc14") in the filename to designate the Visual Studio version which has been used to build them. This number ("#") has tradionally been the major number of the respective platform toolset. The preview releases of Visual Studio 2017 shipped with platform toolset 15.00, so we used "vc15" to mark the files. The first GA release of Visual Studio 2017, however, shipped with platform toolset 14.10 (to signal the backward compatibility), but the internal Visual Studio version number stayed 15.00. To avoid confusion with already distributed packages, we stuck with the "vc15" marker. For our Visual Studio 2019 builds (PHP 7.4 and master) we finally changed from "vc#" to "vs#" (note the "s"), where the number now designates the major internal Visual Studio version number. We are planning to stick with this new naming scheme for the foreseeable future.

  • Copyright © 2001-2023 The PHP Group
    All rights reserved.