2014-03-14 15:24:03 +01:00
|
|
|
<?php
|
2019-12-11 20:19:38 +01:00
|
|
|
|
2014-03-14 15:24:03 +01:00
|
|
|
/**
|
|
|
|
* PHP Server Monitor
|
|
|
|
* Monitor your servers and websites.
|
|
|
|
*
|
|
|
|
* This file is part of PHP Server Monitor.
|
|
|
|
* PHP Server Monitor is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* PHP Server Monitor is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* @package phpservermon
|
2017-04-15 21:34:49 +02:00
|
|
|
* @author Pepijn Over <pep@mailbox.org>
|
|
|
|
* @copyright Copyright (c) 2008-2017 Pepijn Over <pep@mailbox.org>
|
2014-03-14 15:24:03 +01:00
|
|
|
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
|
|
|
|
* @version Release: @package_version@
|
|
|
|
* @link http://www.phpservermonitor.org/
|
2014-04-05 09:31:41 +02:00
|
|
|
* @since phpservermon 3.0.0
|
2014-03-14 15:24:03 +01:00
|
|
|
**/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Current PSM version
|
|
|
|
*/
|
2020-04-19 15:31:40 +02:00
|
|
|
define('PSM_VERSION', '3.4.6-beta.3');
|
2014-03-14 15:24:03 +01:00
|
|
|
|
2014-03-31 22:03:12 +02:00
|
|
|
/**
|
|
|
|
* URL to check for updates. Will not be checked if turned off on config page.
|
|
|
|
* @see psm_update_available()
|
|
|
|
*/
|
2019-09-26 14:07:16 +02:00
|
|
|
define('PSM_UPDATE_URL', 'https://api.github.com/repos/phpservermon/phpservermon/releases/latest');
|
2014-03-31 22:03:12 +02:00
|
|
|
|
|
|
|
/**
|
2019-09-26 14:07:16 +02:00
|
|
|
* Default update interval (1 day). Only applicable when updates are enabled.
|
2014-03-31 22:03:12 +02:00
|
|
|
* @see psm_update_available()
|
|
|
|
*/
|
2019-09-26 14:07:16 +02:00
|
|
|
define('PSM_UPDATE_INTERVAL', 1 * 24 * 60 * 60);
|
2014-03-31 22:03:12 +02:00
|
|
|
|
2014-03-14 15:24:03 +01:00
|
|
|
/**
|
|
|
|
* Configuration for: Hashing strength
|
|
|
|
* This is the place where you define the strength of your password hashing/salting
|
|
|
|
*
|
|
|
|
* To make password encryption very safe and future-proof, the PHP 5.5 hashing/salting functions
|
|
|
|
* come with a clever so called COST FACTOR. This number defines the base-2 logarithm of the rounds of hashing,
|
|
|
|
* something like 2^12 if your cost factor is 12. By the way, 2^12 would be 4096 rounds of hashing, doubling the
|
|
|
|
* round with each increase of the cost factor and therefore doubling the CPU power it needs.
|
|
|
|
* Currently, in 2013, the developers of this functions have chosen a cost factor of 10, which fits most standard
|
|
|
|
* server setups. When time goes by and server power becomes much more powerful, it might be useful to increase
|
|
|
|
* the cost factor, to make the password hashing one step more secure. Have a look here
|
|
|
|
* (@see https://github.com/panique/php-login/wiki/Which-hashing-&-salting-algorithm-should-be-used-%3F)
|
|
|
|
* in the BLOWFISH benchmark table to get an idea how this factor behaves. For most people this is irrelevant,
|
|
|
|
* but after some years this might be very very useful to keep the encryption of your database up to date.
|
|
|
|
*
|
|
|
|
* Remember: Every time a user registers or tries to log in (!) this calculation will be done.
|
|
|
|
* Don't change this if you don't know what you do.
|
|
|
|
*
|
|
|
|
* To get more information about the best cost factor please have a look here
|
|
|
|
* @see http://stackoverflow.com/q/4443476/1114320
|
|
|
|
*
|
|
|
|
* This constant will be used in the login and the registration class.
|
|
|
|
*/
|
2014-11-06 10:52:30 +01:00
|
|
|
define('PSM_LOGIN_HASH_COST_FACTOR', '10');
|
2014-03-14 15:24:03 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Configuration for: Cookies
|
|
|
|
* Please note: The COOKIE_DOMAIN needs the domain where your app is,
|
|
|
|
* in a format like this: .mydomain.com
|
|
|
|
* Note the . in front of the domain. No www, no http, no slash here!
|
|
|
|
* For local development .127.0.0.1 or .localhost is fine, but when deploying you should
|
|
|
|
* change this to your real domain, like '.mydomain.com' ! The leading dot makes the cookie available for
|
|
|
|
* sub-domains too.
|
|
|
|
* @see http://stackoverflow.com/q/9618217/1114320
|
|
|
|
* @see http://www.php.net/manual/en/function.setcookie.php
|
|
|
|
*
|
|
|
|
* COOKIE_RUNTIME: How long should a cookie be valid ? 1209600 seconds = 2 weeks
|
|
|
|
* COOKIE_DOMAIN: The domain where the cookie is valid for, like '.mydomain.com'
|
|
|
|
* COOKIE_SECRET_KEY: Put a random value here to make your app more secure. When changed, all cookies are reset.
|
|
|
|
*/
|
2014-11-06 10:52:30 +01:00
|
|
|
define('PSM_LOGIN_COOKIE_RUNTIME', 1209600);
|
|
|
|
define('PSM_LOGIN_COOKIE_DOMAIN', null);
|
|
|
|
define('PSM_LOGIN_COOKIE_SECRET_KEY', '4w900de52e3ap7y77y8675jy6c594286');
|
2014-03-14 15:24:03 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Number of seconds the reset link is valid after sending it to the user.
|
|
|
|
*/
|
2014-03-15 00:35:35 +01:00
|
|
|
define('PSM_LOGIN_RESET_RUNTIME', 3600);
|
|
|
|
|
|
|
|
/**
|
2014-11-06 10:52:30 +01:00
|
|
|
* Number of seconds the cron is supposedly dead and we will run another cron anyway. Set to 0 to disable.
|
2014-03-15 00:35:35 +01:00
|
|
|
*/
|
2014-04-07 01:05:49 +02:00
|
|
|
define('PSM_CRON_TIMEOUT', 600);
|
2014-07-28 11:10:23 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Default timeout in seconds for curl requests (can be overwritten per-server).
|
|
|
|
*/
|
|
|
|
define('PSM_CURL_TIMEOUT', 10);
|
2014-08-01 16:40:20 +02:00
|
|
|
|
2014-08-05 15:49:17 +02:00
|
|
|
/**
|
|
|
|
* Clone URL for the Pushover.net service.
|
|
|
|
*/
|
2014-11-06 10:52:30 +01:00
|
|
|
define('PSM_PUSHOVER_CLONE_URL', 'https://pushover.net/apps/clone/php_server_monitor');
|
|
|
|
|
2018-02-26 23:23:50 +01:00
|
|
|
/**
|
|
|
|
* Get chat id for Telegram service.
|
|
|
|
*/
|
|
|
|
define('PSM_TELEGRAM_GET_ID_URL', 'https://telegram.me/cid_bot');
|
|
|
|
|
2014-11-06 10:52:30 +01:00
|
|
|
/**
|
|
|
|
* By defining the PSM_BASE_URL, you will force the psm_build_url() to use this.
|
|
|
|
* Useful for cronjobs if it cannot be auto-detected.
|
|
|
|
*/
|
2014-11-06 14:38:00 +01:00
|
|
|
//define('PSM_BASE_URL', null);
|
2015-02-27 14:25:34 +01:00
|
|
|
|
2018-07-05 19:59:57 +02:00
|
|
|
if (!defined('PSM_MODULE_DEFAULT')) {
|
2019-12-11 20:19:38 +01:00
|
|
|
/**
|
|
|
|
* Default theme
|
|
|
|
*/
|
|
|
|
define('PSM_THEME', 'default');
|
2015-02-27 14:25:34 +01:00
|
|
|
|
2019-12-11 20:19:38 +01:00
|
|
|
/**
|
|
|
|
* Default module (if none given or invalid one)
|
|
|
|
*/
|
|
|
|
define('PSM_MODULE_DEFAULT', 'server_status');
|
2015-02-27 14:25:34 +01:00
|
|
|
}
|
2020-04-19 15:31:40 +02:00
|
|
|
|
|
|
|
if (defined('PSM_JABBER_FORCE_TLS') === false) {
|
|
|
|
define('PSM_JABBER_FORCE_TLS', true);
|
|
|
|
}
|
|
|
|
if (defined('PSM_JABBER_AUTH_TYPE') === false) {
|
|
|
|
// possible values: PLAIN, X-OAUTH2, DIGEST-MD5, CRAM-MD5, SCRAM-SHA-1, ANONYMOUS, EXTERNAL
|
|
|
|
define('PSM_JABBER_AUTH_TYPE', 'PLAIN'); // default just plain because of google for example :(
|
|
|
|
}
|
|
|
|
if (defined('PSM_JABBER_DEBUG_LEVEL') === false) {
|
|
|
|
// possible values: ERROR, WARNING, NOTICE, INFO, DEBUG
|
|
|
|
define('PSM_JABBER_DEBUG_LEVEL', JAXLLogger::WARNING);
|
|
|
|
}
|