/**
  * Returns an associative, multi-dimensional array containing version
  * information about different software components in the server.
  *
  * @return array all version information
  */
 public function execute()
 {
     $_ringside = array('version' => $this->getRingsideServerVersion(), 'build_number' => $this->getRingsideServerBuildNumber(), 'build_date' => $this->getRingsideServerBuildDate(), 'svn_revision' => $this->getRingsideServerSvnRevision(), 'install_dir' => M3_Util_Settings::getRingsideServerInstallDir());
     $_php = array('version' => $this->getPhpVersionReal(), 'doctrine_version' => Doctrine::VERSION, 'php_ini_file' => M3_Util_Settings::getPhpIniFileLocation());
     // get all loaded extension versions
     $_extensions = array();
     $_loadedExtensions = get_loaded_extensions();
     foreach ($_loadedExtensions as $_loadedExtension) {
         $_extensions[strtolower($_loadedExtension)] = $this->getPhpVersionForExtension($_loadedExtension);
     }
     // There are some extensions we know we need, so force ourselves to get
     // their information. This is so we can show unloaded extensions in the list
     // to let the caller know something is missing that we expect to be loaded.
     $_extensions['tidy'] = $this->getPhpVersionForExtension('tidy');
     $_extensions['curl'] = $this->getPhpVersionForExtension('curl');
     $_extensions['xsl'] = $this->getPhpVersionForExtension('xsl');
     $_extensions['mcrypt'] = $this->getPhpVersionForExtension('mcrypt');
     $_extensions['pdo'] = $this->getPhpVersionForExtension('pdo');
     ksort($_extensions);
     $_extList = array();
     foreach ($_extensions as $_name => $_version) {
         $_extList[] = array('name' => $_name, 'version' => $_version);
     }
     return array('ringside' => $_ringside, 'php' => $_php, 'extensions' => array('extension' => $_extList));
 }
 public function validateRequest()
 {
     $this->pathname = $this->getRequiredApiParam("pathname");
     $this->useIncludePath = $this->getApiParam("useIncludePath");
     // not allowed to look for files in parent directories
     if (preg_match("/\\.\\./", $this->pathname)) {
         throw new OpenFBAPIException("Illegal pathname has been rejected");
     }
     if (isset($this->useIncludePath) && $this->useIncludePath == "true") {
         $this->pathname = M3_Util_File::findFileInIncludePath($this->pathname);
     } else {
         $_installDir = M3_Util_Settings::getRingsideServerInstallDir();
         $this->pathname = M3_Util_File::buildPathName($_installDir, $this->pathname);
     }
     if (!file_exists($this->pathname)) {
         throw new OpenFBAPIException("File [{$this->pathname}] does not exist");
     }
     // don't process request for any content larger than 1MB
     $_size = filesize($this->pathname);
     if ($_size >= M3_Util_Settings::getMaxSizeAllowedOperationGetFileContent()) {
         throw new OpenFBAPIException("File [{$this->pathname}] is too large [{$_size}]");
     }
     return;
 }