Jayz Posted December 11, 2011 Share Posted December 11, 2011 Ok well i have a virtual world, my friendcoded the emulator. In PHP but he's on holiday for 2 weeks. I keep getting PHP Warning: PHP Startup: It is not safe to rely on the system's timezone setti ngs. You are *required* to use the date.timezone setting or the date_default_tim ezone_set() function. In case you used any of those methods and you are still ge tting this warning, you most likely misspelled the timezone identifier. We selec ted 'Europe/London' for '0.0/no DST' instead in Unknown on line 0 PHP Warning: eval(): 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 ' Europe/London' for '0.0/no DST' instead in C:\inetpub\wwwroot\main\server\chapat iz.php(2) : eval()'d code on line 4 But there are only 4 lines in chapatiz.php and it has nothing to do with it i think <?php eval(file_get_contents('serv_original.ini')); ?> Here's chapatiz.php (Its attached since its big) //config $socketurl = "munizonline.co.uk; $httpurl = "munizonine.co.uk; $rootPath = "c:/inetpub/wwwroot/"; // SQL SETTINGS $host = 'localhost'; $user = 'root'; $dbname = 'chapatiz'; $password = '---'; $sqli = new mysqli("p:". $host, $user, $password, $dbname); // create a persistant sql connexion (keepAlive) $banned_ips = array(); ///// ADD BAN BY IP FROM HTACCESS $filename = $rootPath.".htaccess"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); $contents = utf8_decode($contents); $ex = explode("\n", $contents); $exf = array(); foreach ($ex AS $k => $str) { if(preg_match('`deny from (.*?) \#`', $str, $sortie)) { $return = $sortie[1]; array_push($exf, $return); } } foreach ($exf AS $k => $str) { array_push($banned_ips, $str); } // LOG ALL ACTIONS function dolog($text) { $myFile = "c:/inetpub/wwwroot/main/log/chat.txt"; $fh = fopen($myFile, 'a'); fwrite($fh, $text. "\n"); fclose($fh); } function serve($r) { return file_get_contents('C:/inetpub/wwwroot/main/server/serve/'. $r. '.php'); } function getitems($name) { return file_get_contents('http://munizonline.co.uk/main/items.php?u='. $name); } function haveitem($name, $item) { $c = file_get_contents('http://munizonline.co.uk/main/items.php?u='. $name); $pattern = '/"'. $item .'"/'; $pattern2 = '/"0'. $item .'"/'; if ((preg_match($pattern, $c)) OR (preg_match($pattern2, $c))) { return true; } else { return false; } } function dotag($tag) { $tag = explode('##', $tag); $tags = array(); foreach ($tag AS $k => $v) { list($name, $value) = explode('=', $v); $tags[$name] = $value; } return $tags; } function updatetag($tags, $tochange, $value) { $tags[$tochange] = $value; $new = "##"; foreach ($tags AS $k => $v) { $new .= $k. "=". $v. '##'; } return $new; } ini_set('display_errors', '1'); error_reporting(0); $quete8 = $sqli->query('UPDATE phpbb_users SET online = 0'); function cmd() { return false; } $modee = false; session_start(); $_SESSION['start'] = "yess"; $mainsock = socket_create(AF_INET, SOCK_STREAM, 0); //modifiez la prochaine ligne si besoin $pport = rand(81, 8000); while (!socket_bind($mainsock, $socketurl, $pport)) { $pport = rand(81, 8000); echo "\n port modified to ". $pport. "\n"; } $myFile = $rootPath."main/server/socket.php"; $fh = fopen($myFile, 'w+') or die("can't open file"); fwrite($fh, $socketurl. ":". $pport); fclose($fh); socket_set_nonblock($mainsock); socket_listen($mainsock); $clients=Array(); $compteur=0; $write = NULL; $except = NULL; $lol = NULL; $race = "0"; $flag = "0"; date_default_timezone_set('Europe/London'); $ok_marry = "0"; $ok_pv = "0"; function random($car) { $string = ""; return $string; } function random3($car3) { $string3 = ""; return $string3; } function random2($car2) { $string2 = ""; return $string2; } function random1($car1) { $string1 = ""; return $string1; } echo("Waiting for players!\n"); $file = file_get_contents($rootPath.'main/server/server_while.php'); $lasteval = time(); while(true){ if ($lasteval <= strtotime('-1 minute')) { if (file_exists($rootPath."main/server/server_while.php")) { $file = file_get_contents($rootPath.'main/server/server_while.php'); } $lasteval = time(); echo "\neval again\n\n"; } eval($file); } I have no clue whats wrong it use to work. 17182_.php Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/ Share on other sites More sharing options...
trq Posted December 11, 2011 Share Posted December 11, 2011 You need to setup the timezone in your php.ini Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1296721 Share on other sites More sharing options...
Jayz Posted December 11, 2011 Author Share Posted December 11, 2011 Yes i just fixed that sorry. Now all i get is C:\Users\Administrator\Desktop\Chapatiz Uk>php "C:\Documents and Settings\Admini strator\Desktop\Chapatiz Uk\chapatiz.php" C:\Users\Administrator\Desktop\Chapatiz Uk>pause Press any key to continue . . . How do i fix this? Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1296723 Share on other sites More sharing options...
Jayz Posted December 11, 2011 Author Share Posted December 11, 2011 Sorry but bump, Can anyone help? :confused: Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1296727 Share on other sites More sharing options...
Winstons Posted December 11, 2011 Share Posted December 11, 2011 Try set date_default_timezone_set('Europe/London'); At beginning your php file. Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1296750 Share on other sites More sharing options...
Jayz Posted December 11, 2011 Author Share Posted December 11, 2011 Try set date_default_timezone_set('Europe/London'); At beginning your php file. I've already done that i have a new errorlooka t post #3 Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1296751 Share on other sites More sharing options...
Jayz Posted December 12, 2011 Author Share Posted December 12, 2011 Anyone can help. Look at #3 post Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1297017 Share on other sites More sharing options...
Jayz Posted December 13, 2011 Author Share Posted December 13, 2011 Please help look at post #3 on here. Link to comment https://forums.phpfreaks.com/topic/252929-datetimezone-setting-error/#findComment-1297565 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.