|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70530 php_uname function output wrong information
Submitted: 2015-09-19 16:21 UTC Modified: 2015-09-25 13:38 UTC
From: khaweronline at gmail dot com Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 5.6.11 OS: Win 10 32 Bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
26 - 6 = ?
Subscribe to this entry?

 [2015-09-19 16:21 UTC] khaweronline at gmail dot com
I am using Win 10 and PHP 5.6.11. When i echo php_uname() it provided me wrong information about my OS. Instead of showing Windows 10 Professional Edition, 
PHP showed me Windows 8 Professional Edition.

Test script:
echo php_uname();

Expected result:
Windows NT TESTSVR-PC 6.2 build 9200 (Windows 10 Professional Edition) i586

Actual result:
Windows NT TESTSVR-PC 6.2 build 9200 (Windows 8 Professional Edition) i586


php-uname-fix-for-windows-10 (last revision 2017-08-06 19:18 UTC by gideaow at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-19 16:27 UTC] khaweronline at gmail dot com
-PHP Version: 5.6Git-2015-09-19 (Git) +PHP Version: 5.6.11
 [2015-09-19 16:27 UTC] khaweronline at gmail dot com
Updated Version
 [2015-09-20 00:35 UTC]
-Status: Open +Status: Feedback -Package: *General Issues +Package: PHP options/info functions
 [2015-09-20 00:35 UTC]
See also bug #69642

You're sure you're using 5.6.11 and not, say, 5.6.10? And are you running 32- or 64-bit?
 [2015-09-20 09:18 UTC] khaweronline at gmail dot com
-Status: Feedback +Status: Open -Operating System: Win 10 +Operating System: Win 10 32 Bit
 [2015-09-20 09:18 UTC] khaweronline at gmail dot com
I am using Windows 10 Pro 32 bit and PHP 5.6.11
 [2015-09-21 11:39 UTC]
-Status: Open +Status: Feedback
 [2015-09-21 11:39 UTC]
I've just tried, specifically downloaded 5.6.11 and what i see on my box is

> php -n -r "echo php_uname();"
Windows NT PHP-DEV 10.0 build 10240 (Windows 10) AMD64

So not sure what could be strange. Build 9200 is indeed from some Win 8 and Server 2012 series. It was also used in some early technical previews, which made it to be recognized as win8. Any chance you use some technical preview still? And, do you use the official PHP binaries?

 [2015-09-21 18:51 UTC] khaweronline at gmail dot com
-Status: Feedback +Status: Open
 [2015-09-21 18:51 UTC] khaweronline at gmail dot com
Please check these screenshots this may help
 [2015-09-21 19:06 UTC]
XAMPP? Don't they build their own PHP?
 [2015-09-22 13:16 UTC]
-Status: Open +Status: Feedback
 [2015-09-22 13:16 UTC]
Yeah, XAMPP is the keyword. I guess I understand what happens.

Every PHP binary now integrates the manifest which makes all the version functionality work under win10. However, for that to work, the binaries that load PHP have to have integrated manifests, too. So say in this case, if loading the PHP module into Apache, httpd.exe has to have an embedded manifest.

PHP itself, say CLI, integrates manifests (actually everywhere into DLLs and executables). @khaweronline if you try CLI, it should show correct results. But we're not in control of the XAMPP builds, so probably those have no embedded manifests. The ones I know doing that are from, one can try them.

To embed a manifest, it is not necessary to recompile the binary. If you have Visual Studio installed, you can do it with your XAMPP bins . But anyway, how it looks like, it's something to be reported to the XAMPP project. @khaweronline, maybe you could do it also linking to the ticket mentioned by @requinix.

 [2015-09-25 13:38 UTC] khaweronline at gmail dot com
-Status: Feedback +Status: Closed
 [2015-09-25 13:38 UTC] khaweronline at gmail dot com
Thanks for your comments PHP Team. After reading your comments, i downloaded PHP 5.6.12 and replaced my XAMPP Pre installed PHP with the downloaded one.
But still it showed me Windows 8 Professional Edition instead of Windows 10 Professional Edition. So far i don't known whether this is Bug in PHP or XAMPP. That's why i m closing this BUG.
If anyone report same issue in PHP, please reopen this bug.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jun 24 21:01:24 2021 UTC