代码之家  ›  专栏  ›  技术社区  ›  Mohita Chhabra

架构创建在安装SilverStripe时出错

  •  0
  • Mohita Chhabra  · 技术社区  · 6 年前

    我正在尝试在我的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
    

    这方面的任何指示都将非常有用。

    1 回复  |  直到 6 年前
        1
  •  2
  •   Fatal Error    6 年前

    您没有指定要安装的SilverStripe版本。但从线路上看

    设置C:\xampp\htdocs\SilverStripe-cms-v3。1.7-rc1\mysite/\u配置。php

    我猜您使用的是3.1.7版本,它已经过时,并且与PHP 7不兼容。

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