How fast is php_uname() say doing php_uname('s n') or php_uname('a'). The reason I ask is because I'd like to use it to determine which server I'm on and therefore the configuration (paths, etc).
This is related to Is there a PHP function or variable giving the local host name?
...
Hello,
What is a good way to call 'uname -a' from a C++ program and send the results to a stream?
I looked at system() and exec(), but they do not seem to give access to the stdout of the call.
Thanks.
-William
...
When I install my app, I would like to copy some files in /lib/modules/KERNEL_VERSION/extra.
The problem of course is that KERNEL_VERSION is not fixed.
I can find it by calling "uname -r", but how do I do this in a rpm spec file?
Also, if there's a better method, I'm opened to ideas.
...
Hi all, I should write a function to get some information about the system (the most important information is the the architecture). I found the function uname which can be used including sys/utsname.h. Well, though I googled and I read the documentation, I couldn't find any example of the function and I don't understand how to use uname...
Title says it all. I need to determine the type of OS the PHP server is running on.
By type, I mean strings like "windows" or "linux", not "wince", "winnt" etc.
So far, I have to leads: PHP_OS and uname(), the later being more reliable than the earlier (PHP_OS says what OS PHP was built on - according to documentation).
...
Short story: I need to write a PHP script which finds the correct OS type from uname (eg: both wince and winnt would return windows). See here for more info.
Shouldn't this be a community wiki?
Yes but...see here.
How to help: If your OS is not listed below, please run this code and share your findings:
<?php
echo php_uname();
?>...