Bug #67407 [NEW]: Windows 8.1/Server 2012 R2 reported as Windows 8/Server 2012
| From: | wenz@php.net | Date: | Tue, 10 Jun 2014 08:39:34 +0000 |
| Subject: | Bug #67407 [NEW]: Windows 8.1/Server 2012 R2 reported as Windows 8/Server 2012 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186128@lists.php.net to get a copy of this message | ||
From: wenz
Operating system: Windows 8.1
PHP version: master-Git-2014-06-10 (Git)
Package: PHP options/info functions
Bug Type: Bug
Bug description:Windows 8.1/Server 2012 R2 reported as Windows 8/Server 2012
Description:
------------
The phpinfo() output on Windows 8.1 and Windows Server 2012 R2 reports
the OS as Windows 8 and Windows Server 2012.
This is due to the deprecation of GetVersionEx (which we are using) on
these platforms -
http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074%28v=vs.85%29.aspx
Once we compile the Windows builds with the Visual Studio 2013 compiler
and the Windows 8.1 SDK, _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_LATEST)
seems to help. However until then we need a different approach.
VerifyVersionInfo
(http://msdn.microsoft.com/en-us/library/windows/desktop/ms725491%28v=vs.85%29.aspx)
looks like the best solution to me. It is slower than GetVersionEx, so
we should only run it if we detect Windows 8/Server 2012 and then need
to decide whether it's 8.1/2012 R2 instead. The attached patch proposes
an implementation.
Test script:
---------------
<?php
phpinfo(INFO_GENERAL);
Expected result:
----------------
Output contains "Windows 8.1" on a Windows 8.1 machine.
Output contains "Windows Server 2012 R2" on a Windows Server 2012 R2
machine.
Actual result:
--------------
Output contains "Windows 8" (and not 8.1) on a Windows 8.1 machine.
Output contains "Windows Server 2012" (and not R2) on a Windows Server
2012 R2 machine.
--
Edit bug report at https://bugs.php.net/bug.php?id=67407&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67407&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67407&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67407&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67407&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67407&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67407&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67407&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67407&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67407&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67407&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67407&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67407&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67407&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67407&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67407&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67407&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67407&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67407&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67407&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67407&r=mysqlcfg