sunilvadranapu Posted July 24, 2009 Share Posted July 24, 2009 HI, I'm trying to develop a PHP script that should return OS name(Linux/UNIX) of the system on which the script is running. <?php echo "php_uname: ". php_uname("s") ."\n"; echo "PHP_OS: ". PHP_OS ."\n"; ?> This script is returning host name correctly but not OS name php_uname: sun102 PHP_OS: sun56 --- it shoud be UNIX Can anyone help me to get this. Thanks in advance -sun Quote Link to comment Share on other sites More sharing options...
Bendude14 Posted July 24, 2009 Share Posted July 24, 2009 the documentation point out that if your are running and old version of UNIX then it may fall back to the operating system on which PHP was built on. I believe this could be your problem. You can read more here. http://us2.php.net/manual/en/function.php-uname.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.