Bug #69642 [Fbk]: Windows 10 reported as Windows 8 in phpinfo()
| From: | wenz@php.net | Date: | Wed, 27 May 2015 19:01:56 +0000 |
| Subject: | Bug #69642 [Fbk]: Windows 10 reported as Windows 8 in phpinfo() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192931@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69642&edit=1
ID: 69642
Updated by: wenz@php.net
Reported by: wenz@php.net
Summary: Windows 10 reported as Windows 8 in phpinfo()
Status: Feedback
Type: Bug
Package: PHP options/info functions
Operating System: Windows 10
PHP Version: master-Git-2015-05-15 (Git)
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
yeah, standalone it works, but (as far as I understand it) the GetVersionInfoSize and GetVersionInfo
functions are only available if I pull them out of version.dll using GetProcAddress(), and
that's what somehow doesn't work in my patch. Or I am missing something trivial, which
might very well be possible with my rusty C.
Previous Comments:
------------------------------------------------------------------------
[2015-05-27 18:41:47] ab@php.net
Please check this https://gist.github.com/weltling/bc99faed4f09d615b7a7
. This works with vc9 to vc14. But I'm completely not sure we should use it, it adds one more
dll dependency. Heh ... i'd still prefer to dig further for manifests.
Thanks.
------------------------------------------------------------------------
[2015-05-27 18:30:31] wenz@php.net
took a closer look at it. Actually my non-working patch uses a very similar approach. I fail at
using the GetFileVersionInfoSize and GetFileVersionInfo functions from version.dll - getting NULL
back (see the patch). Is there something obvious I am missing?
------------------------------------------------------------------------
[2015-05-27 12:47:17] wenz@php.net
Sorry for the late reply. I did try the manifest approach, but did not get any change in behavior.
Maybe there is a way to embed the manifest in the executable, but I did not succeed in doing so.
The file version approach sounds good. I am trying a similar approach in my (non-functional) patch,
but the link you posted looks very promising. Will probably try that tomorrow.
------------------------------------------------------------------------
[2015-05-27 12:30:20] ab@php.net
@wenz, ping, were you able to verify the snippets to read file versions?
Thanks.
------------------------------------------------------------------------
[2015-05-20 19:42:44] ab@php.net
I was a bit rambling around on this matter and tripped over this blog http://blogs.msdn.com/b/chuckw/archive/2013/09/10/manifest-madness.aspx
. Theoretically, we could try to create manifests. The current makefile is already prepared for
that, it there's a file with a suffix .manifest, it'll be taken automatically. Say, having
x64\Release_TS\php7ts.dll, a file x64\Release_TS\php7ts.dll.manifest would be picked up
automatically if exists. I've tried this but it was still delivering 6.2 under win8.1.
Notsure, maybe you'll have more luck :) But we should check this carefully, not that it'd
need some digital signatures or alike, that were bad.
Another resource - to the possibility of reading file versions. A worky example can be found here https://support.microsoft.com/en-us/kb/167597/
. With that, I saw outputs like 10,0,10074,0 on kernel32.dll and user32.dll under win10, and like
6,3,9600,17415 under win8.1. Though this way isn't recommended officially, maybe we could take
it as a very last fallback solution, if nothing else works. At least you could check whether you see
the same as described.
The function IsWindows10OrGreater() didn't want even to link for me, quite strange.
But anyway you're right, we'd better to fix this as early as possible. Possibly also for
PHP5.
Thanks.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=69642
--
Edit this bug report at https://bugs.php.net/bug.php?id=69642&edit=1