php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #25186 php_uname - not the build os, but the running os
Submitted: 2003-08-21 05:26 UTC Modified: 2004-08-06 15:02 UTC
From: cheezy@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2003-08-21 05:26 UTC] cheezy@php.net
Description:
------------
Is this note correct?

vbhackattack at hotmail dot com 24-Mar-2003 05:17

According to the source code for this function (/ext/standard/info.c), the description is not correct. The function returns information about the operating system PHP is _running_ on, not built on. For example, if PHP was build on Win2000 but is running on WinXP, the function should report a version number appropriate for WinXP. I have not tested this, just read the source code which calls the WinAPI function GetVersion() or the *nix function uname() at _run_ time.

John



Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-21 05:42 UTC] daveb at optusnet dot com dot au
To me it looks like:

On Windows, it's always the running OS.

On *nix, it's the running OS except when the call to uname() fails or when <sys/utsname.h> doesn't exist, then it falls back to the build OS.

As for the PHP_OS constant, it seems to always be the build OS.

So the documentation appears to needs work.
 [2003-08-21 05:45 UTC] didou@php.net
Please don't report bugs for the notes in the manual. 
See http://www.php.net/manual/en/about.notes.php

you can send us a mail at php-notes@lists.php.net if you want us to remove some notes.

cheers,

didou
 [2003-08-21 05:49 UTC] didou@php.net
sorry, I need some coffee.. :)
forget what I've said
 [2004-08-06 15:02 UTC] dave@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

After almost a year, I have fixed this. See http://cvs.php.net/diff.php/phpdoc/en/reference/info/functions/php-uname.xml?r1=1.9&r2=1.10&ty=h
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Aug 12 17:01:31 2024 UTC