Configuration

Database Schema Cache

If your database schemas are changed frequently. You can disable the schema cache feature.

Open config/config.php and find

$config['cache_schema'] = -1;

and changed to

$config['cache_schema'] = 1;

  • 1 or other positive number means cache 1 or more seconds
  • -1 or 0 means the schema cache never expired

Report Cache

If you do not want cache the report data, and want DbFacePHP get the data from target database realtime, you can disable report cache feature.

Open config/config.php and find

$config['cache_app'] = -1;

and changed to

$config['cache_app'] = 1;

  • 1 or other positive number means cache 1 or more seconds
  • -1 or 0 means the report cache never expired

Access Security

In most cases, you just want to allow accessing the item at some ips(at home or at work), in this case, please configure the whitelist. All ip addresses not in the whitelist will be denied to access the service. Please go to the installation directory, and open the application/config/config.php file, and find the following line:

$config[‘white_list’]=; i.e. Edit it to $config[‘white_list’]=’192.168.0.1-192.168.0.24;211.157.2.99′;”

you may have known, only 192.168.0.1 ~ 192.168.0.24 and 211.157.2.99 allowed to access the service.

Enable/Disable Online Support

If you want to disable the “Online Support” . Editing config/config.php

$config['enable_onlinesupport'] = TRUE;
$config['enable_onlinesupport'] = FALSE;

Google Map API KEY

We recommend you use your own Google Map API Key for Google Map. Please refer this page to get how to obtain your own API Key.
https://developers.google.com/maps/documentation/javascript/tutorial#api_key

Once you get your own key, open config/config.php and edit

$config['google.appkey'] = 'Your-Own-API-KEY';

How to sort the menu items at the left side?

DbFacePHP provide a hook function to implement custom orders for the menu items at the left side.

It was located in config/hooks.php

function sort_sidemenu($categoryapps) {
return $categoryapps;
}

The following is an example for alphabetical ordering

function sort_sidemenu($categoryapps) {
$result = array();
foreach($categoryapps as $key => $apps) {
usort($apps, function($a, $b) {
return strcmp($a["name"], $b["name"]);
});
$result[$key] = $apps;
}
ksort($result);
return $result;
}