Whats up with the () date

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

Post Reply
Kip3r
Posts: 5
Joined: 14 Dec 2011, 18:55

Whats up with the () date

Post by Kip3r »

I have change the date with webmin. I have also check the file for misspelling. I have also made a new installation of everything. Using opensuse 11.4. How can I solve this problem?

I got the messages and manialive dont start

Code: Select all



  ##################################     ###################################
  ##################################     ###################################
                                                                         ###
  ################  ################     ###  ############  ###########  ###
  ################  ################     ###  ############  ###########  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
ManiaLive
PHP Environment Compatibility Test
-----------------------------------------------------
PHP 5.3.1 or newer    -> required  -> [ Yes ] 5.3.5
Standard PHP Library  -> required  -> [ Yes ]
JSON                  -> required  -> [ Yes ]
OpenSSL               -> required  -> [ Yes ]
cURL with SSL         -> required  -> [ Yes ] 7.21.2 (OpenSSL/1.0.0c) (with OpenSSL/1.0.0c)
SQLite                -> optional  -> [ Yes ]
-----------------------------------------------------
PHP Fatal error:  Uncaught exception 'ErrorException' with message 'date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead' in /srv/TmServerZone/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php:114
Stack trace:
#0 [internal function]: ManiaLive\Application\ErrorHandling::createExceptionFromError(2, 'date(): It is n...', '/srv/xxx...', 114, Array)
#1 /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(114): date('d.m.Y')
#2 /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(56): ManiaLive\Application\ErrorHandling::displayAndLogError(Object(ErrorException))
#3 /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/AbstractApplication.php(156): ManiaLive\Application\ErrorHan in /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php on line 114

Fatal error: Uncaught exception 'ErrorException' with message 'date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead' in /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php:114
Stack trace:
#0 [internal function]: ManiaLive\Application\ErrorHandling::createExceptionFromError(2, 'date(): It is n...', '/srv/xxx...', 114, Array)
#1 /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(114): date('d.m.Y')
#2 /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php(56): ManiaLive\Application\ErrorHandling::displayAndLogError(Object(ErrorException))
#3 /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/AbstractApplication.php(156): ManiaLive\Application\ErrorHan in /srv/xxxe/ManiaLive/libraries/ManiaLive/Application/ErrorHandling.php on line 114


The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: Whats up with the () date

Post by The_Big_Boo »

If the problem persists, you can add those lines to bootstrapper.php (which are included in last ManiaLive2 release). It should do the trick.

Code: Select all

if(!ini_get('date.timezone'))
	date_default_timezone_set(date_default_timezone_get());
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
farfa
Nadeo
Nadeo
Posts: 585
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: Whats up with the () date

Post by farfa »

You can also add to your php.ini date.timezone = Europe/Paris (or whatever you want if it's written here: http://php.net/date.timezone )
Also known as: satanasdiabolo
Kip3r
Posts: 5
Joined: 14 Dec 2011, 18:55

Re: Whats up with the () date

Post by Kip3r »

The server is up and running but I still got the ()date messages so I dont know if ManiaLive working as it should.

Code: Select all


./run --nodaemon
Launching ManiaLive with the following arguments:

  ##################################     ###################################
  ##################################     ###################################
                                                                         ###
  ################  ################     ###  ############  ###########  ###
  ################  ################     ###  ############  ###########  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
               ###  ###                  ###  ###      ###  ###     ###  ###
ManiaLive
PHP Environment Compatibility Test
-----------------------------------------------------
PHP 5.3.1 or newer    -> required  -> [ Yes ] 5.3.5
Standard PHP Library  -> required  -> [ Yes ]
JSON                  -> required  -> [ Yes ]
OpenSSL               -> required  -> [ Yes ]
cURL with SSL         -> required  -> [ Yes ] 7.21.2 (OpenSSL/1.0.0c) (with OpenSSL/1.0.0c)
SQLite                -> optional  -> [ Yes ]
-----------------------------------------------------
PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* 
to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those 
methods and you are still getting this warning, you most likely misspelled the timezone identifier. 
We selected 'UTC' for 'UTC/0.0/no DST' instead in /srv/TmServerZone/ManiaLive/bootstrapper.php on line 73
[22:39:45] XML-RPC connection established
[22:39:45] Successfully authentified with XML-RPC server
[22:39:47] Current map: Frosty Morning :)
[PluginHandler] Start plugin load process:
[PluginHandler] is loading Freezone\Freezone ...
[PluginHandler] is loading Reaby\XasecoIntegration ...
[22:39:47] [Xaseco Integration] Plugin: v0.31 by reaby.
[PluginHandler] All registered plugins have been loaded
[22:40:19] Map change: Frosty Morning :) -> TMN-X*Acura says hello'09 #8
[22:46:52] Map change: TMN-X*Acura says hello'09 #8 -> 11Handicap


I have put the code here should I place it some where else?

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: 264 $:
 * @author      $Author: martin.gwendal $:
 * @date        $Date: 2011-09-12 23:02:11 +0200 (lun., 12 sept. 2011) $:
 */

$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;
}
$openssl_ok = (extension_loaded('openssl') && function_exists('openssl_sign'));
$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 'OpenSSL               -> required  -> ' . ($openssl_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                -> optional  -> ' . ($sqlite_ok ? success() : failure()) . PHP_EOL;
echo '-----------------------------------------------------' . PHP_EOL;


if(!$php_ok || !$curl_ok || !$spl_ok || !$json_ok || !$openssl_ok)
{
    echo 'Your system is not compatible, check your php configuration.';
    exit;
}


if(!ini_get('date.timezone'))
   date_default_timezone_set(date_default_timezone_get());

if(!$sqlite_ok)
{
    echo 'SQLite is disabled, 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();
?>
Kip3r
Posts: 5
Joined: 14 Dec 2011, 18:55

Re: Whats up with the () date

Post by Kip3r »

farfa wrote:You can also add to your php.ini date.timezone = Europe/Paris (or whatever you want if it's written here: http://php.net/date.timezone )

It was already set to the zone I use, so it did not change anything!
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: Whats up with the () date

Post by The_Big_Boo »

ManiaLive is working as it should. But indeed, with a @ in front of date_default_timezone_get() you won't see the warning.
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest