|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC