fix build date parsing from php if php patched with suhosin: $ php -v PHP 5.3.27 with Suhosin-Patch (cli) (built: Aug 30 2013 04:30:30) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies --- ohai-6.16.0/lib/ohai/plugins/php.rb 2013-01-17 21:03:16.000000000 +0200 +++ ohai-6.16.0/lib/ohai/plugins/php.rb 2013-09-11 15:26:11.000000000 +0300 @@ -26,10 +26,10 @@ status, stdout, stderr = run_command(:no_status_check => true, :command => "php -v") if status == 0 - output = stdout.split - if output.length >= 6 + output = /PHP (\S+).+built: ([^)]+)/.match(stdout) + if output php[:version] = output[1] - php[:builddate] = "%s %s %s" % [output[4],output[5],output[6]] + php[:builddate] = output[2] end languages[:php] = php if php[:version] end