Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you are running Open-AudIT on Centos (or the Opmantek VM which is running Centos), with a version of PHP < v5.5 you will need to patch three files to ensure discoveries run.

This is due to the ancient PHP version on Centos (which is older than 5.5).

The files and changes are below.

You can check your server for the current version of PHP using php -v, for example:


Code Block
[root@myopenauditserver]# php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies


If the version of PHP is < 5.5 then you must patch the following three files to ensure your discoveries will run. These changes have been incorporated into the next release.


  1. EDIT /usr/local/open-audit/code_igniter/application/helpers/discovery_helper.php
    Change line 1150 from:
Code Block
if (php_uname('s') == 'Windows NT' and exec('whoami') == 'nt authority\system' and !empty($this->config->item('discovery_linux_script_directory')) and $this->config->item('discovery_linux_script_directory') == 'y') {

...

Code Block
if (php_uname('s') == 'Windows NT' and exec('whoami') == 'nt authority\system' and !empty($this->config->config['discovery_linux_script_directory']) and $this->config->config['discovery_linux_script_directory'] == 'y') {


2. EDIT /usr/local/open-audit/code_igniter/application/controllers/include_input_discoveries.php
Change line 1162 from:

...

Code Block
if (php_uname('s') == 'Windows NT' and exec('whoami') == 'nt authority\system' and !empty($this->config->config['discovery_linux_script_directory']) and $this->config->config['discovery_linux_script_directory'] == 'y') {



3. EDIT /usr/local/open-audit/code_igniter/application/models/m_scripts.php
Change line 219 from:

...