Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies
Moderator: NADEO
w1lla
Posts: 2287 Joined: 15 Jun 2010, 11:09
Manialink: maniaplanetblog
Location: Netherlands
Contact:
Post
by w1lla » 20 Sep 2011, 01:44
add in bootstrapper.php in the main folder of manialive the following code
Just copy+ctrl a + paste
Code: Select all
<?php
/**
* ManiaLive - TrackMania dedicated server manager in PHP
*
* @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
* @version $Revision: 249 $:
* @author $Author: ... $:
* @date $Date: 2011-08-12 13:41:42 +0200 (vr, 12 aug 2011) $:
*/
date_default_timezone_set('Europe/Berlin');
$php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.1', '>='));
$json_ok = (extension_loaded('json') && function_exists('json_encode') && function_exists('json_decode'));
$spl_ok = extension_loaded('spl');
if (function_exists('curl_version'))
{
$curl_version = curl_version();
$curl_ok = (function_exists('curl_exec') && in_array('https', $curl_version['protocols'], true));
}
else
{
$curl_ok = false;
}
$sqlite2_ok = extension_loaded('sqlite');
$sqlite3_ok = extension_loaded('sqlite3');
$sqlite_ok = ($sqlite2_ok || $sqlite3_ok);
function success($s = 'Yes')
{
return "[ " . $s . " ]";
}
function failure($s = 'No ')
{
return "[ " . $s . " ]";
}
echo
'
################################## ###################################
################################## ###################################
###
################ ################ ### ############ ########### ###
################ ################ ### ############ ########### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
';
echo 'ManiaLive' . PHP_EOL;
echo 'PHP Environment Compatibility Test' . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
echo 'PHP 5.3.1 or newer -> required -> ' . ($php_ok ? (success() . ' ' . phpversion()) : failure()) . PHP_EOL;
echo 'Standard PHP Library -> required -> ' . ($spl_ok ? success() : failure()) . PHP_EOL;
echo 'JSON -> required -> ' . ($json_ok ? success() : failure()) . PHP_EOL;
echo 'cURL with SSL -> required -> ' . ($curl_ok ? (success() . ' ' . $curl_version['version'] . ' (' . $curl_version['ssl_version'] . ')' . (is_array($curl_version['protocols']) && in_array('https', $curl_version['protocols'], true) ? ' (with ' . $curl_version['ssl_version'] . ')' : ' (without SSL)')) : failure()) . PHP_EOL;
echo 'SQLite -> optionnal -> ' . ($sqlite_ok ? success() : failure()) . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
if(!$php_ok || !$curl_ok || !$spl_ok || !$json_ok)
{
echo 'Your system is not compatible, check your php configuration.';
exit;
}
if(!$sqlite_ok)
{
echo 'SQLite is disable, threading will not work. ManiaLive may encounter some perfomance trouble.';
}
// enable error reporting
ini_set('display_errors', 1);
error_reporting(E_ALL);
// include the __autoload function ...
require_once __DIR__ . '/utils.inc.php';
ManiaLiveApplication\Application::getInstance()->run();
?>
Last edited by
TMarc on 13 Nov 2015, 21:37, edited 1 time in total.
Reason: removed mail adress of the author
w1lla
Posts: 2287 Joined: 15 Jun 2010, 11:09
Manialink: maniaplanetblog
Location: Netherlands
Contact:
Post
by w1lla » 20 Sep 2011, 09:50
can you post your config.ini. Maybe your have ; in front of some important parts. At the moment manialive cant connect to the server.
w1lla
Posts: 2287 Joined: 15 Jun 2010, 11:09
Manialink: maniaplanetblog
Location: Netherlands
Contact:
Post
by w1lla » 20 Sep 2011, 21:15
as said before:
date_default_timezone_set Europe/Berlin;
you need to put it like this:
w1lla wrote: add in bootstrapper.php in the main folder of manialive the following code
Just copy+ctrl a + paste
Code: Select all
<?php
/**
* ManiaLive - TrackMania dedicated server manager in PHP
*
* @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
* @version $Revision: 249 $:
* @author $Author: ... $:
* @date $Date: 2011-08-12 13:41:42 +0200 (vr, 12 aug 2011) $:
*/
date_default_timezone_set('Europe/Berlin');
$php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.1', '>='));
$json_ok = (extension_loaded('json') && function_exists('json_encode') && function_exists('json_decode'));
$spl_ok = extension_loaded('spl');
if (function_exists('curl_version'))
{
$curl_version = curl_version();
$curl_ok = (function_exists('curl_exec') && in_array('https', $curl_version['protocols'], true));
}
else
{
$curl_ok = false;
}
$sqlite2_ok = extension_loaded('sqlite');
$sqlite3_ok = extension_loaded('sqlite3');
$sqlite_ok = ($sqlite2_ok || $sqlite3_ok);
function success($s = 'Yes')
{
return "[ " . $s . " ]";
}
function failure($s = 'No ')
{
return "[ " . $s . " ]";
}
echo
'
################################## ###################################
################################## ###################################
###
################ ################ ### ############ ########### ###
################ ################ ### ############ ########### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
### ### ### ### ### ### ### ###
';
echo 'ManiaLive' . PHP_EOL;
echo 'PHP Environment Compatibility Test' . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
echo 'PHP 5.3.1 or newer -> required -> ' . ($php_ok ? (success() . ' ' . phpversion()) : failure()) . PHP_EOL;
echo 'Standard PHP Library -> required -> ' . ($spl_ok ? success() : failure()) . PHP_EOL;
echo 'JSON -> required -> ' . ($json_ok ? success() : failure()) . PHP_EOL;
echo 'cURL with SSL -> required -> ' . ($curl_ok ? (success() . ' ' . $curl_version['version'] . ' (' . $curl_version['ssl_version'] . ')' . (is_array($curl_version['protocols']) && in_array('https', $curl_version['protocols'], true) ? ' (with ' . $curl_version['ssl_version'] . ')' : ' (without SSL)')) : failure()) . PHP_EOL;
echo 'SQLite -> optionnal -> ' . ($sqlite_ok ? success() : failure()) . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;
if(!$php_ok || !$curl_ok || !$spl_ok || !$json_ok)
{
echo 'Your system is not compatible, check your php configuration.';
exit;
}
if(!$sqlite_ok)
{
echo 'SQLite is disable, threading will not work. ManiaLive may encounter some perfomance trouble.';
}
// enable error reporting
ini_set('display_errors', 1);
error_reporting(E_ALL);
// include the __autoload function ...
require_once __DIR__ . '/utils.inc.php';
ManiaLiveApplication\Application::getInstance()->run();
?>
Last edited by
TMarc on 13 Nov 2015, 21:38, edited 1 time in total.
Reason: removed mail adress of the author
nocturne
Posts: 208 Joined: 23 Jun 2010, 21:31
Post
by nocturne » 15 Oct 2011, 20:30
Should probably add a timezone check to manialive just to avoid problems like this, as many just don't set their php timezone.. In aseco v2, think we fixed it with an ini_get() check, and then set it if not found via date_default_timezone_get.
Oh... have it right here..
Code: Select all
if (!ini_get('date.timezone')) {
$this->console_text('Timezone not set in php.ini. Edit it and change/set "date.timezone" appropriately.');
$tz = date_default_timezone_get();
date_default_timezone_set($tz);
}
Users browsing this forum: No registered users and 0 guests