Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: httpd.exe has no supportedOS manifest - modules see Win 8 |
|
| Author |
|
martinstepar
Joined: 27 Oct 2026 Posts: 2 Location: Czech Republic, Prague
|
Posted: Tue 27 Oct '26 16:47 Post subject: httpd.exe has no supportedOS manifest - modules see Win 8 |
|
|
Hi,
the httpd.exe in the current VS18 build no longer embeds a manifest with a <compatibility> / supportedOS section. Because of that, GetVersionEx() inside the httpd process returns 6.2 build 9200 (Windows 8 ) on Windows 10/11, and every module loaded into httpd inherits this (a manifest in the module DLL has no effect, only the exe manifest counts).
Older Apache Lounge builds had this manifest in httpd.exe. It was added in early 2018 at the PHP team's request: https://www.apachelounge.com/viewtopic.php?p=36308
Environment
- Windows 11 Home 10.0.26200 x64
- Apache/2.4.69 (Win64) OpenSSL/3.5.9, "Apache Lounge VS18 Server built: Oct 1 2026 09:34:06", running as a service
- PHP 8.5.12 ZTS x64 as module (php8apache2_4.dll)
Embedded manifest of httpd.exe 2.4.69 (VS18)
| Code: | <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
</assembly> |
Embedded manifest of httpd.exe 2.4.54 (built Nov 10 2022)
| Code: | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
<!-- Windows 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
<!-- Windows 8 --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
<!-- Windows 8.1 --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
<!-- Windows 10 --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
</application>
</compatibility>
</assembly> |
In 2.4.54, httpd.exe was the only exe in bin\ with this section, so it looks like a dedicated build step for httpd.exe.
How to reproduce
| Code: | <?php
echo php_uname(), "\n";
echo PHP_WINDOWS_VERSION_MAJOR, '.', PHP_WINDOWS_VERSION_MINOR, ' build ', PHP_WINDOWS_VERSION_BUILD, "\n"; |
Under httpd 2.4.69 (mod_php):
| Code: | Windows NT HOST 6.2 build 9200 (Windows 8 Home Premium Edition) AMD64
6.2 build 9200 |
The same PHP via php.exe (CLI), which has its own supportedOS manifest:
| Code: | Windows NT HOST 10.0 build 26200 (Windows 11) AMD64
10.0 build 26200 |
Quick check of the manifest from PowerShell:
| Code: | $t = [Text.Encoding]::ASCII.GetString([IO.File]::ReadAllBytes('C:\Apache24\bin\httpd.exe'))
$t.Contains('8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a') # True = Windows 10/11 declared |
Impact
This is not only a wrong version string. PHP enables part of its handling of Windows Cloud Files placeholders (OneDrive Files On-Demand, Dropbox on the Cloud Files API) only on Windows 10 build >= 18362 (see PHP bug #78220, Zend/zend_virtual_cwd.c). With 6.2 reported, PHP under httpd can no longer stat or open anything inside such a folder ("failed to open stream: No such file or directory"), while the same script via php.exe works. In my case writing into a Dropbox folder worked with 2.4.54 and broke right after the upgrade to 2.4.69.
Probable cause
The switch to Visual Studio 2026 (VS18) and CMake ( https://www.apachelounge.com/viewtopic.php?p=43982 ). As far as I can see, the upstream CMakeLists.txt builds httpd.exe from server/main.c and build/win32/httpd.rc only, without a manifest that has a <compatibility> section, so the linker embeds just the default trustInfo. The step that used to add the manifest seems to have been lost in the switch. I only compared 2.4.54 and 2.4.69, so I don't know which release was the first one without it.
Suggested fix
Embed a manifest with the <compatibility> section in httpd.exe again (at least the Windows 10/11 GUID {8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}, ideally also 8.1, 8, 7 and Vista as before). For example:
- in CMake, list a .manifest file among the sources of the httpd target; with MSVC, CMake merges it into the embedded manifest:
| Code: | | ADD_EXECUTABLE(httpd server/main.c build/win32/httpd.rc build/win32/httpd.manifest) |
or restore the post-build step:
| Code: | | mt.exe -manifest httpd.exe.manifest -outputresource:httpd.exe;#1 |
Thanks for all your work on the builds! |
|
| Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3216 Location: Hilversum, NL, EU
|
Posted: Tue 27 Oct '26 18:09 Post subject: |
|
|
Wow.. good explanation.
Are you in a hurry to solve it ? I can give you a httpd.exe with the manifest (64 or 32 bit)
Next httpd release or update contains the manifest again.
I did in the past the post-build. CMake is not needed.
Steffen |
|
| Back to top |
|
martinstepar
Joined: 27 Oct 2026 Posts: 2 Location: Czech Republic, Prague
|
Posted: Fri 30 Oct '26 10:24 Post subject: |
|
|
Hi Steffen,
Thank you for the quick reply and for the offer, I really appreciate it.
No hurry on my side. I only use this for my own things, a handful of times a month, so I'm happy to wait for the next release or update. In the meantime I just save the files from the PHP app outside the cloud files folder and copy them over manually.
I tried to put as much information into the report as I could. AI helped a lot with that. It's a great helper when you know how to use it.
Thanks again for all your work on the binaries!
Martin |
|
| Back to top |
|
|
|
|
|
|