I tried installing Magento2 today to try it out.
I ftp'd the zipped codebase from github to my server and unpacked it, but when I try to run the installer I get the below error.
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /public_html/magento2/app/bootstrap.php on line 64
Lines 59 down are:
/**
* Require necessary files
*/
require_once BP . '/app/functions.php';
require_once __DIR__ . '/autoload.php';
(new \Magento\Framework\Autoload\IncludePath())->addIncludePath(array(BP . '/app/code', BP . '/lib/internal'));
$classMapPath = BP . '/var/classmap.ser';
if (file_exists($classMapPath)) {
require_once BP . '/lib/internal/Magento/Framework/Autoload/ClassMap.php';
$classMap = new \Magento\Framework\Autoload\ClassMap(BP);
$classMap->addMap(unserialize(file_get_contents($classMapPath)));
spl_autoload_register(array($classMap, 'load'), true, true);
}
if (!defined('BARE_BOOTSTRAP')) {
$maintenanceFlag = BP . '/' . \Magento\Framework\App\State\MaintenanceMode::FLAG_DIR . '/'
. \Magento\Framework\App\State\MaintenanceMode::FLAG_FILENAME;
if (file_exists($maintenanceFlag)) {
if (!in_array($_SERVER['REMOTE_ADDR'], explode(",", file_get_contents($maintenanceFlag)))) {
if (PHP_SAPI == 'cli') {
echo 'Service temporarily unavailable due to maintenance downtime.';
} else {
include_once BP . '/pub/errors/503.php';
}
exit;
}
}
if (!empty($_SERVER['MAGE_PROFILER'])) {
\Magento\Framework\Profiler::applyConfig(
$_SERVER['MAGE_PROFILER'],
dirname(__DIR__),
!empty($_REQUEST['isAjax'])
);
}
}
date_default_timezone_set(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE);
Any ideas what could be causing this issue?