Page 2 of 2

Re: ManiaLive wont start.

Posted: 20 Sep 2011, 01:44
by w1lla
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();
?>

Re: ManiaLive wont start.

Posted: 20 Sep 2011, 06:14
by insistent
Damn
http://img534.imageshack.us/img534/448/hfgq.png

Is there a way to only use the music player for myself on other server? Thats all i need.

Re: ManiaLive wont start.

Posted: 20 Sep 2011, 09:50
by w1lla
can you post your config.ini. Maybe your have ; in front of some important parts. At the moment manialive cant connect to the server.

Re: ManiaLive wont start.

Posted: 20 Sep 2011, 17:23
by insistent

Re: ManiaLive wont start.

Posted: 20 Sep 2011, 21:15
by w1lla
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();
?>

Re: ManiaLive wont start.

Posted: 15 Oct 2011, 20:30
by nocturne
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);
		}