Skip to content

Commit ae74549

Browse files
committed
backport the fix for bug #67739
1 parent 61ec9b5 commit ae74549

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/standard/info.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,14 @@ PHPAPI char *php_get_uname(char mode)
600600

601601
php_get_windows_cpu(wincpu, sizeof(wincpu));
602602
dwBuild = (DWORD)(HIWORD(dwVersion));
603+
604+
/* Windows "version" 6.2 could be Windows 8/Windows Server 2012, but also Windows 8.1/Windows Server 2012 R2 */
605+
if (dwWindowsMajorVersion == 6 && dwWindowsMinorVersion == 2) {
606+
if (strncmp(winver, "Windows 8.1", 11) == 0 || strncmp(winver, "Windows Server 2012 R2", 22) == 0) {
607+
dwWindowsMinorVersion = 3;
608+
}
609+
}
610+
603611
snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d (%s) %s",
604612
"Windows NT", ComputerName,
605613
dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu);

0 commit comments

Comments
 (0)