Skip to content

Instantly share code, notes, and snippets.

@maranemil
maranemil / gist:fd6cd302dcd8485aba04
Last active August 29, 2015 14:09
SugarCRM 6.5 performance optimization tuning
<?php
/***CONFIGURATOR***/
$sugar_config['js_custom_version'] = '';
$sugar_config['list_max_entries_per_page'] = '15';
$sugar_config['default_module_favicon'] = false;
$sugar_config['dashlet_auto_refresh_min'] = '30';
$sugar_config['show_download_tab'] = true;
$sugar_config['enable_action_menu'] = true;
$sugar_config['stack_trace_errors'] = false;
@maranemil
maranemil / gist:4ad5cb3b5b9d7a41bfd4
Last active August 8, 2018 05:00
SugarCRM 7.5 performance optimization tuning
<?php
/***CONFIGURATOR***/
$sugar_config['save_query'] = 'populate_only';
$sugar_config['verify_client_ip'] = false;
$sugar_config['disable_count_query'] = true;
$sugar_config['disable_vcr'] = true;
$sugar_config['hide_subpanels'] = true;
$sugar_config['hide_subpanels_on_login'] = true;
$sugar_config['external_cache_disabled'] = true;
@maranemil
maranemil / gist:2671a143d951c410528a
Last active August 29, 2015 14:09
SugarCRM 6.5 allow access to specific pages
<?php
// avoids the Cross-site forgery attack blocker
$sugar_config['http_referer']['list'][] = 'localhost';
$sugar_config['http_referer']['actions'] = array( 'index', 'ListView', 'DetailView', 'EditView', 'Authenticate', 'Login' );
// or
$sugar_config['http_referer']['list']['0'] = 'localhost';
$sugar_config['http_referer']['actions']['0'] = 'index';
$sugar_config['http_referer']['actions']['1'] = 'ListView';
@maranemil
maranemil / gist:2ca296457c9d9fd993a1
Last active August 29, 2015 14:09
SugarCRM 6.5 config_override add new settings on install
<?php
if(!defined('sugarEntry')) define('sugarEntry', true);
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/entryPoint.php');
global $db;
global $moduleList;
/////////////////////////////////////////////////////////////////////////////////
@maranemil
maranemil / gist:8a9a2f8b7bd944898604
Last active August 29, 2015 14:09
SugarCRM 6.5 config_override remove settings on uninstall
<?php
if(!defined('sugarEntry')) define('sugarEntry', true);
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/entryPoint.php');
//global $db;
//global $moduleList;
@maranemil
maranemil / gist:31fdad589da707f302f5
Last active August 29, 2015 14:10
SugarCRM get version of installed packages
<?php
/**
* Created by PhpStorm.
* User: emil
* Date: 21.11.14
* Time: 12:05
*/
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
@maranemil
maranemil / gist:83a0a55ddba7bd8da213
Last active August 29, 2015 14:10
SugarCRM On Demand Settings
<?php
/*
Module Loader Restriction Alternatives
http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_7.2/70_API/Application/Module_Loader/20_Module_Loader_Restriction_Alternatives/
Module Loader Restrictions
http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_6.7/02_Application_Framework/Module_Loader/00_Module_Loader_Restrictions/
@maranemil
maranemil / gist:b2d9f8359264e1316e24
Last active August 29, 2015 14:10
SugarCRM Boosting Config
<?php
/***CONFIGURATOR***/
$sugar_config['admin_access_control'] = false;
$sugar_config['admin_export_only'] = true;
$sugar_config['cache_dir'] = 'cache/';
$sugar_config['calculate_response_time'] = false;
$sugar_config['dbconfigoption']['persistent'] = false;
$sugar_config['dbconfigoption']['autofree'] = false;
@maranemil
maranemil / gist:f44564b52d3aa9c3fc66
Last active August 29, 2015 14:10
Debug in SugarCRM
<?php
// most entry points have this, except soap.php
// require_once ('log4php/LoggerManager.php'); # deprecated
require_once('include/SugarLogger/LoggerManager.php');
$GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
// depending on what your log level is set at in log4php.properties
$GLOBALS['log']->fatal(msg);
$GLOBALS['log']->debug(msg);
@maranemil
maranemil / gist:2ddc545ca94c3d75b8ff
Created December 9, 2014 09:17
Clean Lamp Log File on Ubuntu 14.10
sudo find / -name '*' -size +1G
sudo truncate -s0 error_log