安装 SilverStripe 时架构创建出错

Schema creation giving error while installing SilverStripe

我正在尝试在我的 XAMPP 设置中安装 SilverStripe CMS。 (Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.8 ) 在 localhost/SilverStripe/install.php 中,我提供了我的数据库的详细信息并单击安装 SilverStripe。

数据库已创建,但模式创建出错。 (下面的错误文本)

   Installing SilverStripe...
    I am now running through the installation steps (this should take about 30 seconds)
    If you receive a fatal error, refresh this page to continue the installation
    Setting up 'mysite/_config.php'...
    Setting up C:\xampp\htdocs\SilverStripe-cms-v3.1.7-rc1\mysite/_config.php
    Setting up '.htaccess' file...
    Setting up C:\xampp\htdocs\SilverStripe-cms-v3.1.7-rc1\.htaccess
    Building database schema...
     [Notice] Array to string conversion
     POST /SilverStripe-cms-v3.1.7-rc1/install.php
     Line 497 in C:\xampp\htdocs\SilverStripe-cms-v3.1.7-rc1\framework\model\Database.php

    Source
    488         $newTable = false;
    489         
    490         // backwards compatibility patch for pre 2.4 requireField() calls
    491         $spec_orig=$spec;
    492         
    493         if(!is_string($spec)) {
    494             $spec['parts']['name'] = $field;
    495             $spec_orig['parts']['name'] = $field;
    496             //Convert the $spec array into a database-specific string
    497             $spec=DB::getConn()->$spec['type']($spec['parts'], true);
    498         }
    499         
    500         // Collations didn't come in until MySQL 4.1.  Anything earlier will throw a syntax error if you try and use
    501         // collations.
    502         // TODO: move this to the MySQLDatabase file, or drop it altogether?
    503         if(!$this->supportsCollations()) {

Trace
SS_Database->requireField(File,ClassName,Array) 
DB.php:337
DB::requireField(File,ClassName,Array) 
Enum.php:83
Enum->requireField() 
Database.php:375
SS_Database->requireTable(File,Array,Array,1,Array,) 
DB.php:327
DB::requireTable(File,Array,Array,1,Array,) 
DataObject.php:3090
DataObject->requireTable() 
DatabaseAdmin.php:211
DatabaseAdmin->doBuild(1) 
install.php5:1415
Installer->install(Array) 
install.php5:277
include(C:\xampp\htdocs\SilverStripe-cms-v3.1.7-rc1\framework\dev\install\install.php5) 
install.php:26
include(C:\xampp\htdocs\SilverStripe-cms-v3.1.7-rc1\framework\dev\install\install.php) 
install.php:13
[Notice] Undefined property: MySQLDatabase::$Array

关于此的任何指示都会非常有帮助。

您没有指定要安装的 SilverStripe 的版本。但是从行

Setting up C:\xampp\htdocs\SilverStripe-cms-v3.1.7-rc1\mysite/_config.php

我猜您使用的是 3.1.7 版本,该版本已过时且与 PHP 7.

不兼容

使用 PHP 7 时,您需要使用 SilverStripe 3.6 或更高版本。