php.net |  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
 [2015-09-19 16:21 UTC] khaweronline at gmail dot com
Description:
------------
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:
---------------
<?php
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

Patches

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

History

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] requinix@php.net
-Status: Open +Status: Feedback -Package: *General Issues +Package: PHP options/info functions
 [2015-09-20 00:35 UTC] requinix@php.net
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] ab@php.net
-Status: Open +Status: Feedback
 [2015-09-21 11:39 UTC] ab@php.net
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?

Thanks.
 [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

http://s4.postimg.org/56qohkwwd/sc1.jpg
http://s21.postimg.org/4qmzrr5ef/sc2.jpg
 [2015-09-21 19:06 UTC] requinix@php.net
XAMPP? Don't they build their own PHP?
 [2015-09-22 13:16 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-09-22 13:16 UTC] ab@php.net
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 apachelounge.com, 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 https://msdn.microsoft.com/en-us/library/vstudio/ms235591%28v=vs.100%29.aspx . 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.

Thanks.
 [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-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 17:01:28 2019 UTC