|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40013 php_uname() doesnt return nodename
Submitted: 2007-01-03 16:32 UTC Modified: 2009-09-06 22:01 UTC
Avg. Score:4.2 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: gk at gknw dot de Assigned: pajoye (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 6CVS-2007-01-03 (snap) OS: NetWare
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.
Bug Type:
From: gk at gknw dot de
New email:
PHP Version: OS:


 [2007-01-03 16:32 UTC] gk at gknw dot de
On NetWare platform php_uname('n') returns a hardcoded string 'NLM' which is pretty much useless. This is due to the fact that Novell NetWare pupulates the utsname struct different from other Posix platfoms. Nevertheless they have added a bunch of other useful members which return the correct hostname as well as more accurate version infos.
Here's a unified diff against ./ext/standard/info.c which corrects php_uname() for NetWare, and also adds some more useful information:
to verify this proposed patch here's a test script running on PHP 5.2.0 unpatched (NetWare 6.50 SP 6):
and here's running PHP 5.2.0 patched (NetWare 5.10 SP 8):
as you can see I get here the hostname of the machine, and in addition the NetWare version + SP level, and the libc version too.
Would be great if this patch gets applied.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-05 21:21 UTC]
Applied to 5.2 and HEAD, remains 5.3. I will do it later, no 5.3 tree at hand and low bandwidth here :)
 [2009-09-06 22:01 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - fix #40013, php_uname() doesnt return nodename (MFH)
 [2009-09-06 22:01 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2009-10-09 17:15 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Merge: fix #40013, php_uname() doesnt return nodename (MFH)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 19:01:29 2024 UTC