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 Link to comment https://forums.phpfreaks.com/topic/167254-php-script-to-get-os-name/ 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 Link to comment https://forums.phpfreaks.com/topic/167254-php-script-to-get-os-name/#findComment-881859 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.