本文整理汇总了PHP中installLog函数的典型用法代码示例。如果您正苦于以下问题:PHP installLog函数的具体用法?PHP installLog怎么用?PHP installLog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了installLog函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_writable_dir
function create_writable_dir($dirname)
{
if (is_dir($dirname) || @sugar_mkdir($dirname, 0755)) {
$ok = make_writable($dirname);
}
if (empty($ok)) {
installLog("ERROR: Cannot create writable dir {$dirname}");
}
}
示例2: displayMssqlErrors
function displayMssqlErrors($driver_type, $query)
{
global $sugar_config;
if ($driver_type == 'mssqlsrv' && ($errors = sqlsrv_errors(SQLSRV_ERR_ALL)) != null) {
foreach ($errors as $error) {
echo "<div style='color:red;'>";
echo "An error occured when performing the folloing query:<br>";
echo "{$query}<br>";
echo "</div>";
installLog("An error occured when performing the query:" . $query . " SQLSTATE: " . $error['SQLSTATE'] . " message: " . $error['message']);
}
}
if ($driver_type == 'mssql') {
echo "<div style='color:red;'>";
echo "An error occured when performing the folloing query:<br>";
echo "{$query}<br>";
echo "</div>";
installLog("An error occured when performing the query:" . $query . " message: " . mssql_get_last_message());
}
}
示例3: updateUpgradeHistory
$deltaTime = $endTime - $startTime;
///////////////////////////////////////////////////////////////////////////
//// FINALIZE LANG PACK INSTALL
if (isset($_SESSION['INSTALLED_LANG_PACKS']) && is_array($_SESSION['INSTALLED_LANG_PACKS']) && !empty($_SESSION['INSTALLED_LANG_PACKS'])) {
updateUpgradeHistory();
}
///////////////////////////////////////////////////////////////////////////
//// HANDLE SUGAR VERSIONS
require_once 'modules/Versions/InstallDefaultVersions.php';
require_once 'modules/Connectors/InstallDefaultConnectors.php';
///////////////////////////////////////////////////////////////////////////////
//// INSTALL PASSWORD TEMPLATES
include 'install/seed_data/Advanced_Password_SeedData.php';
///////////////////////////////////////////////////////////////////////////////
//// SETUP DONE
installLog("Installation has completed *********");
$memoryUsed = '';
if (function_exists('memory_get_usage')) {
$memoryUsed = $mod_strings['LBL_PERFORM_OUTRO_5'] . memory_get_usage() . $mod_strings['LBL_PERFORM_OUTRO_6'];
}
$errTcpip = '';
$fp = @fsockopen("www.sugarcrm.com", 80, $errno, $errstr, 3);
if (!$fp) {
$errTcpip = "<p>{$mod_strings['ERR_PERFORM_NO_TCPIP']}</p>";
}
if ($fp && (!isset($_SESSION['oc_install']) || $_SESSION['oc_install'] == false)) {
@fclose($fp);
if ($next_step == 9999) {
$next_step = 8;
}
$fpResult = <<<FP
示例4: printErrors
function printErrors($errors)
{
global $mod_strings;
if (count($errors) == 0) {
echo 'dbCheckPassed';
installLog("SUCCESS:: no errors detected!");
} else {
if (count($errors) == 1 && isset($errors["ERR_DB_EXISTS_PROCEED"]) || count($errors) == 2 && isset($errors["ERR_DB_EXISTS_PROCEED"]) && isset($errors["ERR_DB_EXISTS_WITH_CONFIG"])) {
///throw alert asking to overwwrite db
echo 'preexeest';
installLog("WARNING:: no errors detected, but DB tables will be dropped!, issuing warning to user");
} else {
installLog("FATAL:: errors have been detected! User will not be allowed to continue. Errors are as follow:");
//print out errors
$validationErr = "<p><b>{$mod_strings['ERR_DBCONF_VALIDATION']}</b></p>";
$validationErr .= '<ul>';
foreach ($errors as $key => $erMsg) {
if ($key != "ERR_DB_EXISTS_PROCEED" && $key != "ERR_DB_EXISTS_WITH_CONFIG") {
if ($_SESSION['dbUSRData'] == 'same' && $key == 'ERR_DB_ADMIN') {
installLog(".. {$erMsg}");
break;
}
$validationErr .= '<li class="error">' . $erMsg . '</li>';
installLog(".. {$erMsg}");
}
}
$validationErr .= '</ul>';
$validationErr .= '</div>';
echo $validationErr;
}
}
}
示例5: installerHook
installerHook('pre_setSystemTabs');
require_once 'modules/MySettings/TabController.php';
$tabs = new TabController();
$tabs->set_system_tabs($enabled_tabs);
installerHook('post_setSystemTabs');
include_once 'install/suite_install/suite_install.php';
post_install_modules();
//Call rebuildSprites
if (function_exists('imagecreatetruecolor')) {
require_once 'modules/UpgradeWizard/uw_utils.php';
rebuildSprites(true);
}
///////////////////////////////////////////////////////////////////////////////
//// START DEMO DATA
// populating the db with seed data
installLog("populating the db with seed data");
if ($_SESSION['demoData'] != 'no') {
installerHook('pre_installDemoData');
set_time_limit(301);
echo "<br>";
echo "<b>{$mod_strings['LBL_PERFORM_DEMO_DATA']}</b>";
echo "<br><br>";
print $render_table_close;
print $render_table_open;
global $current_user;
$current_user = new User();
$current_user->retrieve(1);
include "install/populateSeedData.php";
installerHook('post_installDemoData');
}
$endTime = microtime(true);
示例6: runCheck
function runCheck($install_script = false, $mod_strings)
{
installLog("Begin System Check Process *************");
if (!isset($install_script) || !$install_script) {
installLog("Error:: " . $mod_strings['ERR_NO_DIRECT_SCRIPT']);
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
}
if (!defined('SUGARCRM_MIN_MEM')) {
define('SUGARCRM_MIN_MEM', 40);
}
// for keeping track of whether to enable/disable the 'Next' button
$error_found = false;
$error_txt = '';
// check IIS and FastCGI
$server_software = $_SERVER["SERVER_SOFTWARE"];
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Microsoft-IIS') !== false && php_sapi_name() == 'cgi-fcgi' && ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
}
if (strpos($server_software, 'Microsoft-IIS') !== false) {
$iis_version = '';
if (preg_match_all("/^.*\\/(\\d+\\.?\\d*)\$/", $server_software, $out)) {
$iis_version = $out[1][0];
}
$check_iis_version_result = check_iis_version($iis_version);
if ($check_iis_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_IIS_INVALID_VER'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_IIS_INVALID_VER']} {$iis_version}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_IISVER'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
} else {
if (php_sapi_name() != 'cgi-fcgi') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
} else {
if (ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
}
}
}
}
// PHP VERSION
$php_version = constant('PHP_VERSION');
$check_php_version_result = check_php_version($php_version);
if ($check_php_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_PHP_INVALID_VER'] . ' ' . $php_version);
$phpVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_PHP_INVALID_VER']} {$php_version} )</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_PHPVER'] . '</b></td>
<td ><span class="error">' . $phpVersion . '</span></td>
</tr>';
}
//Php Backward compatibility checks
if (ini_get("zend.ze1_compatibility_mode")) {
installLog($mod_strings['LBL_BACKWARD_COMPATIBILITY_ON'] . ' ' . 'Php Backward Compatibility');
$phpCompatibility = "<b><span class=stop>{$mod_strings['LBL_BACKWARD_COMPATIBILITY_ON']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>Php Backward Compatibility</b></td>
<td ><span class="error">' . $phpCompatibility . '</span></td>
</tr>';
}
// database and connect
if (!empty($_REQUEST['setup_db_type'])) {
$_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];
}
$mssqlStatus = '';
$dbVersion = '';
// Removed php_sqlsrv install support until the driver support is out of beta status
$supported_dbs = array("mysql_connect", "mysqli_connect", "mssql_connect", "sqlsrv_connect");
$db_support_exists = false;
foreach ($supported_dbs as $dbfunct) {
if (function_exists($dbfunct)) {
$db_support_exists = true;
//.........这里部分代码省略.........
示例7: installLog
//$_POST[''] = $_REQUEST['default_export_charset'];
//$_POST[''] = $_REQUEST['export_delimiter'];
$_POST['record'] = $current_user->id;
$_POST['is_admin'] = $current_user->is_admin ? 'on' : '';
$_POST['use_real_names'] = true;
$_POST['reminder_checked'] = '1';
$_POST['reminder_time'] = 1800;
$_POST['email_reminder_time'] = 3600;
$_POST['mailmerge_on'] = 'on';
$_POST['receive_notifications'] = $current_user->receive_notifications;
installLog('DBG: SugarThemeRegistry::getDefault');
$_POST['user_theme'] = (string) SugarThemeRegistry::getDefault();
// save and redirect to new view
$_REQUEST['return_module'] = 'Home';
$_REQUEST['return_action'] = 'index';
installLog('DBG: require modules/Users/Save.php');
require 'modules/Users/Save.php';
// restore superglobals and vars
$GLOBALS = $varStack['GLOBALS'];
foreach ($varStack['defined_vars'] as $__key => $__value) {
${$__key} = $__value;
}
$endTime = microtime(true);
$deltaTime = $endTime - $startTime;
if (count($bottle) > 0) {
foreach ($bottle as $bottle_message) {
$bottleMsg .= "{$bottle_message}\n";
}
} else {
$bottleMsg = $mod_strings['LBL_PERFORM_SUCCESS'];
}
示例8: die
<?php
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
*/
installLog("creating new user for Snip");
require_once 'modules/SNIP/SugarSNIP.php';
$snip = SugarSNIP::getInstance();
$snip->getSnipUser();
示例9: runCheck
function runCheck($install_script = false, $mod_strings)
{
installLog("Begin System Check Process *************");
if (!isset($install_script) || !$install_script) {
installLog("Error:: " . $mod_strings['ERR_NO_DIRECT_SCRIPT']);
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
}
if (!defined('SUGARCRM_MIN_MEM')) {
define('SUGARCRM_MIN_MEM', 40);
}
// for keeping track of whether to enable/disable the 'Next' button
$error_found = false;
$error_txt = '';
// check IIS and FastCGI
$server_software = $_SERVER["SERVER_SOFTWARE"];
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Microsoft-IIS') !== false && php_sapi_name() == 'cgi-fcgi' && ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
}
if (strpos($server_software, 'Microsoft-IIS') !== false) {
$iis_version = '';
if (preg_match_all("/^.*\\/(\\d+\\.?\\d*)\$/", $server_software, $out)) {
$iis_version = $out[1][0];
}
$check_iis_version_result = check_iis_version($iis_version);
if ($check_iis_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_IIS_INVALID_VER'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_IIS_INVALID_VER']} {$iis_version}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_IISVER'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
} else {
if (php_sapi_name() != 'cgi-fcgi') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
} else {
if (ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
}
}
}
}
// PHP VERSION
$php_version = constant('PHP_VERSION');
$check_php_version_result = check_php_version($php_version);
if ($check_php_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_PHP_INVALID_VER'] . ' ' . $php_version);
$phpVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_PHP_INVALID_VER']} {$php_version} )</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_PHPVER'] . '</b></td>
<td ><span class="error">' . $phpVersion . '</span></td>
</tr>';
}
//Php Backward compatibility checks
if (ini_get("zend.ze1_compatibility_mode")) {
installLog($mod_strings['LBL_BACKWARD_COMPATIBILITY_ON'] . ' ' . 'Php Backward Compatibility');
$phpCompatibility = "<b><span class=stop>{$mod_strings['LBL_BACKWARD_COMPATIBILITY_ON']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>Php Backward Compatibility</b></td>
<td ><span class="error">' . $phpCompatibility . '</span></td>
</tr>';
}
// database and connect
if (!empty($_REQUEST['setup_db_type'])) {
$_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];
}
$drivers = DBManagerFactory::getDbDrivers();
if (empty($drivers)) {
$db_name = $mod_strings['LBL_DB_UNAVAILABLE'];
installLog("ERROR:: {$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}");
$dbStatus = "<b><span class=stop>{$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
//.........这里部分代码省略.........
示例10: runCheck
function runCheck($install_script = false, $mod_strings)
{
installLog("Begin System Check Process *************");
if (!isset($install_script) || !$install_script) {
installLog("Error:: " . $mod_strings['ERR_NO_DIRECT_SCRIPT']);
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
}
if (!defined('SUGARCRM_MIN_MEM')) {
define('SUGARCRM_MIN_MEM', 40);
}
// for keeping track of whether to enable/disable the 'Next' button
$error_found = false;
$error_txt = '';
// check IIS and FastCGI
$server_software = $_SERVER["SERVER_SOFTWARE"];
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Microsoft-IIS') !== false && php_sapi_name() == 'cgi-fcgi' && ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<p><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></p>
<p ><span class="error">' . $iisVersion . '</span></p>
';
}
if (strpos($server_software, 'Microsoft-IIS') !== false) {
$iis_version = '';
if (preg_match_all("/^.*\\/(\\d+\\.?\\d*)\$/", $server_software, $out)) {
$iis_version = $out[1][0];
}
$check_iis_version_result = check_iis_version($iis_version);
if ($check_iis_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_IIS_INVALID_VER'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_IIS_INVALID_VER']} {$iis_version}</span></b>";
$error_found = true;
$error_txt .= '
<p><b>' . $mod_strings['LBL_CHECKSYS_IISVER'] . '</b></p>
<p><span class="error">' . $iisVersion . '</span></p>
';
} else {
if (php_sapi_name() != 'cgi-fcgi') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI']}</span></b>";
$error_found = true;
$error_txt .= '
<p><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></p>
<p><span class="error">' . $iisVersion . '</span></p>
';
} else {
if (ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<p><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></p>
<p ><span class="error">' . $iisVersion . '</span></p>
';
}
}
}
}
// PHP VERSION
$php_version = constant('PHP_VERSION');
$check_php_version_result = check_php_version($php_version);
if ($check_php_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_PHP_INVALID_VER'] . ' ' . $php_version);
$phpVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_PHP_INVALID_VER']} {$php_version} )</span></b>";
$error_found = true;
$error_txt .= '
<p><b>' . $mod_strings['LBL_CHECKSYS_PHPVER'] . '</b></p>
<p><span class="error">' . $phpVersion . '</span></p>
';
}
//Php Backward compatibility checks
if (ini_get("zend.ze1_compatibility_mode")) {
installLog($mod_strings['LBL_BACKWARD_COMPATIBILITY_ON'] . ' ' . 'Php Backward Compatibility');
$phpCompatibility = "<b><span class=stop>{$mod_strings['LBL_BACKWARD_COMPATIBILITY_ON']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<p><b>Php Backward Compatibility</b></p>
<p><span class="error">' . $phpCompatibility . '</span></p>
';
}
// database and connect
if (!empty($_REQUEST['setup_db_type'])) {
$_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];
}
$drivers = DBManagerFactory::getDbDrivers();
if (empty($drivers)) {
$db_name = $mod_strings['LBL_DB_UNAVAILABLE'];
installLog("ERROR:: {$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}");
$dbStatus = "<b><span class=stop>{$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}</span></b>";
$error_found = true;
$error_txt .= '
<p><strong>' . $db_name . '</strong></p>
<p class="error">' . $dbStatus . '</p>
';
}
// XML Parsing
if (!function_exists('xml_parser_create')) {
//.........这里部分代码省略.........