#25186 [Bgs->Opn]: php_uname - not the build os, but the running os

From: Date: Thu, 21 Aug 2003 10:49:15 +0000
Subject: #25186 [Bgs->Opn]: php_uname - not the build os, but the running os
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969356043@lists.php.net to get a copy of this message
ID: 25186 Updated by: didou@php.net Reported By: cheezy@php.net -Status: Bogus +Status: Open Bug Type: Documentation problem PHP Version: Irrelevant New Comment: sorry, I need some coffee.. :) forget what I've said Previous Comments: ------------------------------------------------------------------------ [2003-08-21 05:45:52] 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:42:22] 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:26:18] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25186&edit=1

« previous php.doc (#969356043) next »