|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #36754 php_uname('o') not supported
Submitted: 2006-03-16 02:11 UTC Modified: 2010-05-30 10:15 UTC
From: mbogomolni at scyld dot com Assigned: pajoye (profile)
Status: Suspended Package: *General Issues
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mbogomolni at scyld dot com
New email:
PHP Version: OS:


 [2006-03-16 02:11 UTC] mbogomolni at scyld dot com
The function php_uname() supports returning the OS Kernel string.  In the case of Linux, php_uname('s') returns 'Linux'.  However, there is a difference between returning the Kernel string, and returning an OS string.  

Under RedHat Linux : uname -o returns 'GNU/Linux'
Under Midori Linux : uname -o returns 'MIDORI/Linux'
Under QNX 6.3 : uname -o returns 'QNX'

Since the strings that uname -s, and uname -o differ, the php_uname function should also support the 'o' option.

Reproduce code:

echo php_uname('s');
echo php_uname('o');


Expected result:
Under linux, I would expect to see


Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-30 10:15 UTC]
-Status: Open +Status: Suspended -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: pajoye
 [2010-05-30 10:15 UTC]
This addition is not POSIX compliant. However there is a RFC to add this kind of information to uname but as long as it is not added to the POSIX standard (and in the system API), we can't support it.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 23 04:03:34 2021 UTC