php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mbogomolni at scyld dot com
New email:
PHP Version: OS:

 

 [2006-03-16 02:11 UTC] mbogomolni at scyld dot com
Description:
------------
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:
---------------
<?php

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

?>

Expected result:
----------------
Under linux, I would expect to see

Linux
GNU/Linnux

Actual result:
--------------
Linux


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-30 10:15 UTC] pajoye@php.net
-Status: Open +Status: Suspended -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: pajoye
 [2010-05-30 10:15 UTC] pajoye@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC