Base PHP7 work to make it "run" - READ NEXT LINES!

All plugins will need to bump the API if they want to use this.
NOTE THAT THIS IS NOT THE FINAL API 2.0.0 AND THAT THERE WILL BE MORE CHANGES.
To start updating, you might also want to read https://secure.php.net/manual/en/migration70.php and specifically https://secure.php.net/manual/en/migration70.incompatible.php

To compile PHP7 with some of the required dependencies, use https://gist.github.com/shoghicp/166ab26ce5cc7a390f45
ONLY LINUX IS TESTED, DO NOT ASK FOR OTHER PLATFORMS!

----- THIS VERSION IS NOT SUPPORTED -----

This version WILL crash randomly in unexpected places due to PHP7, pthreads, PocketMine or cosmic rays.

Handle with care, and store under direct sunlight for the best performance.
This commit is contained in:
Shoghi Cervantes
2015-09-10 21:29:29 +02:00
parent 244cef3b00
commit e137ac4c56
33 changed files with 131 additions and 124 deletions

View File

@ -143,9 +143,8 @@ namespace pocketmine {
//Logger has a dependency on timezone, so we'll set it to UTC until we can get the actual timezone.
date_default_timezone_set("UTC");
var_dump("LOAD LOGGER");
$logger = new MainLogger(\pocketmine\DATA . "server.log", \pocketmine\ANSI);
var_dump("LOGGER LOADED");
if(!ini_get("date.timezone")){
if(($timezone = detect_system_timezone()) and date_default_timezone_set($timezone)){
@ -320,7 +319,11 @@ namespace pocketmine {
case "mac":
case "linux":
default:
exec("kill -9 " . ((int) $pid) . " > /dev/null 2>&1");
if(function_exists("posix_kill")){
posix_kill($pid, SIGKILL);
}else{
exec("kill -9 " . ((int)$pid) . " > /dev/null 2>&1");
}
}
}
@ -394,8 +397,8 @@ namespace pocketmine {
if(substr_count($pthreads_version, ".") < 2){
$pthreads_version = "0.$pthreads_version";
}
if(version_compare($pthreads_version, "2.0.9") < 0){
$logger->critical("pthreads >= 2.0.9 is required, while you have $pthreads_version.");
if(version_compare($pthreads_version, "3.0.0") < 0){
$logger->critical("pthreads >= 3.0.0 is required, while you have $pthreads_version.");
++$errors;
}
@ -418,13 +421,13 @@ namespace pocketmine {
++$errors;
}
if(!extension_loaded("sqlite3")){
$logger->critical("Unable to find the SQLite3 extension.");
if(!extension_loaded("yaml")){
$logger->critical("Unable to find the YAML extension.");
++$errors;
}
if(!extension_loaded("yaml")){
$logger->critical("Unable to find the YAML extension.");
if(!extension_loaded("sqlite3")){
$logger->critical("Unable to find the SQLite3 extension.");
++$errors;
}