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 extensions for Windows is being worked on. Windows DLL can be downloaded right from the PECL website.
If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.
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.
More recent versions of PHP are built with VS16 or VS17 (Visual Studio 2019 or 2022 compiler respectively) and include improvements in performance and stability.
- The VS16 and VS17 builds require to have the Visual C++ Redistributable for Visual Studio 2015-2022 x64 or x86 installed
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).
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:
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).
PHP 7.1+ supports long and UTF-8 paths. See the manual for details.
Windows DLLs for most PECL extensions are back! We have been working on an alternative way through GitHub Actions to automate the builds of these extensions, which means PECL DLLs are now available on the respective package's download page again.
The next step is automating these builds so that extension authors can include steps in their release actions as well
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.
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!
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!
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.
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!
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).
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!
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.