本文整理汇总了PHP中Installer::getSystemInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::getSystemInfo方法的具体用法?PHP Installer::getSystemInfo怎么用?PHP Installer::getSystemInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::getSystemInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Installer
$oHeadPublisher->addExtJsScript("setup/phpInfo", false);
//Adding a javascript file .js
G::RenderPage("publish", "extJs");
break;
case "processInfo":
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addContent("setup/dbInfo");
//Adding a html file .html
$oHeadPublisher->addExtJsScript("setup/dbInfo", false);
//Adding a javascript file .js
G::RenderPage("publish", "extJs");
break;
default:
require_once PATH_CONTROLLERS . "installer.php";
$installer = new Installer();
$systemInfo = $installer->getSystemInfo();
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addContent("setup/systemInfo");
//Adding a html file .html
$oHeadPublisher->addExtJsScript("setup/systemInfo", false);
//Adding a javascript file .js
$oHeadPublisher->assign("SYSINFO_PHP", "\"" . $systemInfo->php->version . "\", " . ($systemInfo->php->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_MYSQL", "\"" . $systemInfo->mysql->version . "\", " . ($systemInfo->mysql->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_MSSQL", "\"" . $systemInfo->mssql->version . "\", " . ($systemInfo->mssql->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_CURL", "\"" . $systemInfo->curl->version . "\", " . ($systemInfo->curl->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_OPENSSL", "\"" . $systemInfo->openssl->version . "\", " . ($systemInfo->openssl->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_DOMXML", "\"" . $systemInfo->dom->version . "\", " . ($systemInfo->dom->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_GD", "\"" . $systemInfo->gd->version . "\", " . ($systemInfo->gd->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_MULTIBYTESTRING", "\"" . $systemInfo->multibyte->version . "\", " . ($systemInfo->multibyte->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_SOAP", "\"" . $systemInfo->soap->version . "\", " . ($systemInfo->soap->result ? 1 : 0));
$oHeadPublisher->assign("SYSINFO_LDAP", "\"" . $systemInfo->ldap->version . "\", " . ($systemInfo->ldap->result ? 1 : 0));
示例2: generateInfoSupport
public function generateInfoSupport()
{
require_once PATH_CONTROLLERS . "installer.php";
$params = array();
$oServerConf =& serverConf::getSingleton();
$pluginRegistry =& PMPluginRegistry::getSingleton();
$licenseManager =& pmLicenseManager::getSingleton();
//License Information:
$activeLicense = $licenseManager->getActiveLicense();
$licenseInfo = array();
$noInclude = array('licensedfeaturesList', 'result', 'serial');
foreach ($licenseManager as $index => $value) {
if (!in_array($index, $noInclude)) {
$licenseInfo[$index] = G::sanitizeInput($value);
}
}
$params['l'] = $licenseInfo;
//Operative System version (Linux, Windows)
try {
$os = '';
if (file_exists('/etc/redhat-release')) {
$fnewsize = filesize('/etc/redhat-release');
$fp = fopen('/etc/redhat-release', 'r');
$os = trim(fread($fp, $fnewsize));
fclose($fp);
}
$os .= " (" . PHP_OS . ")";
} catch (Exception $e) {
}
$params['s'] = $os;
//On premise or cloud
$licInfo = $oServerConf->getProperty('LICENSE_INFO');
$params['lt'] = isset($licInfo[SYS_SYS]) ? isset($licInfo[SYS_SYS]['TYPE']) ? $licInfo[SYS_SYS]['TYPE'] : '' : '';
//ProcessMaker Version
$params['v'] = System::getVersion();
if (file_exists(PATH_DATA . 'log/upgrades.log')) {
$params['pmu'] = serialize(file_get_contents(PATH_DATA . 'log/upgrades.log', 'r'));
} else {
$params['pmu'] = serialize(G::LoadTranslation('ID_UPGRADE_NEVER_UPGRADE'));
}
//Database server Version (MySQL version)
$installer = new Installer();
$systemInfo = $installer->getSystemInfo();
try {
$params['mysql'] = mysql_get_server_info();
} catch (Exception $e) {
$params['mysql'] = '';
}
//PHP Version
$params['php'] = $systemInfo->php->version;
//Apache - IIS Version
try {
$params['apache'] = apache_get_version();
} catch (Exception $e) {
$params['apache'] = '';
}
//Installed Plugins (license info?)
$arrayAddon = array();
if (file_exists(PATH_DATA_SITE . "ee")) {
$arrayAddon = unserialize(trim(file_get_contents(PATH_DATA_SITE . "ee")));
}
$plugins = array();
foreach ($arrayAddon as $addon) {
$sFileName = substr($addon["sFilename"], 0, strpos($addon["sFilename"], "-"));
if (file_exists(PATH_PLUGINS . $sFileName . ".php")) {
$plugin = array();
$addonDetails = $pluginRegistry->getPluginDetails($sFileName . ".php");
$plugin['name'] = $addonDetails->sNamespace;
$plugin['description'] = $addonDetails->sDescription;
$plugin['version'] = $addonDetails->iVersion;
$plugin['enable'] = $addonDetails->enabled;
$plugins[] = $plugin;
}
}
$params['pl'] = $plugins;
//Number of Users registered in PM. Including LDAP users and PM users.
require_once "classes/model/RbacUsers.php";
$criteria = new Criteria("rbac");
$criteria->addSelectColumn(RbacUsersPeer::USR_AUTH_TYPE);
$criteria->addSelectColumn("COUNT(" . RbacUsersPeer::USR_UID . ") AS USERS_NUMBER");
$criteria->add(RbacUsersPeer::USR_UID, null, Criteria::ISNOTNULL);
$criteria->addGroupByColumn(RbacUsersPeer::USR_AUTH_TYPE);
$rs = RbacUsersPeer::doSelectRS($criteria);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$users = array('local' => 0);
while ($rs->next()) {
$row = $rs->getRow();
if ($row['USR_AUTH_TYPE'] == '' || $row['USR_AUTH_TYPE'] == 'MYSQL') {
$users['local'] = (int) $users['local'] + (int) $row['USERS_NUMBER'];
} else {
$users['USR_AUTH_TYPE'] = $row['USERS_NUMBER'];
}
}
$params['u'] = $users;
//Number of cases.
$oSequences = new Sequences();
$maxNumber = $oSequences->getSequeceNumber("APP_NUMBER");
$params['c'] = $maxNumber - 1;
//Number of active processes.
$criteria = new Criteria("workflow");
//.........这里部分代码省略.........