Jump to:

4952 Posts in 14240 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » installation problems

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1431 Views
  • t-dog
    Avatar
    Community Member
    1 Post

    installation problems Link to this post

    Hi all,
    I stumbled across Silverstripe whilst trying to find a straightforward CMS to use for creating simple CMS websites, i've tried Drupal, Joomla but i just can't get my head around those so hoping Silverstripe is the answer.

    However i'm having problems with the installation, i get the following error but don't know how to correct, i hope someone can help

    * Setting up 'mysite/_config.php'...
    * Setting up /Applications/MAMP/htdocs/works/mysite/_config.php
    * Setting up '.htaccess' file...
    * Setting up /Applications/MAMP/htdocs/works/.htaccess
    * Building database schema...
    [User Error] Couldn't run query: ALTER TABLE "Permission" ADD "ID" int(11) not null auto_increment, ADD "ClassName" enum('Permission') character set utf8 collate utf8_general_ci default 'Permission', ADD "Created" datetime, ADD "LastEdited" datetime, ADD "Code" varchar(50) character set utf8 collate utf8_general_ci, ADD "Arg" int(11) not null default 0, ADD "Type" int(11) not null default 1, ADD "GroupID" int(11) not null default 0, ADD index "GroupID" (GroupID), ADD index "Code" (Code), ADD index "ClassName" (ClassName) Incorrect table definition; there can be only one auto column and it must be defined as a key
    POST /works/install.php

    Line 536 in /Applications/MAMP/htdocs/works/sapphire/core/model/MySQLDatabase.php
    Source

    527    }
    528    
    529    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    530       // try to extract and format query
    531       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    532          $formatter = new SQLFormatter();
    533          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    534       }
    535       
    536       user_error($msg, $errorLevel);
    537    }
    538    
    539    /**
    540     * Return a boolean type-formatted string
    541     *
    542     * @param array $values Contains a tokenised list of info about this data type

    Trace
    o Couldn't run query: ALTER TABLE "Permission" ADD "ID" int(11) not null auto_increment, ADD "ClassName" enum('Permission') character set utf8 collate utf8_general_ci default 'Permission', ADD "Created" datetime, ADD "LastEdited" datetime, ADD "Code" varchar(50) character set utf8 collate utf8_general_ci, ADD "Arg" int(11) not null default 0, ADD "Type" int(11) not null default 1, ADD "GroupID" int(11) not null default 0, ADD index "GroupID" (GroupID), ADD index "Code" (Code), ADD index "ClassName" (ClassName) Incorrect table definition; there can be only one auto column and it must be defined as a key
    Line 536 of MySQLDatabase.php
    o MySQLDatabase->databaseError(Couldn't run query: ALTER TABLE "Permission" ADD "ID" int(11) not null auto_increment, ADD "ClassName" enum('Permission') character set utf8 collate utf8_general_ci default 'Permission', ADD "Created" datetime, ADD "LastEdited" datetime, ADD "Code" varchar(50) character set utf8 collate utf8_general_ci, ADD "Arg" int(11) not null default 0, ADD "Type" int(11) not null default 1, ADD "GroupID" int(11) not null default 0, ADD index "GroupID" (GroupID), ADD index "Code" (Code), ADD index "ClassName" (ClassName) | Incorrect table definition; there can be only one auto column and it must be defined as a key,256)
    Line 134 of MySQLDatabase.php
    o MySQLDatabase->query(ALTER TABLE "Permission" ADD "ID" int(11) not null auto_increment, ADD "ClassName" enum('Permission') character set utf8 collate utf8_general_ci default 'Permission', ADD "Created" datetime, ADD "LastEdited" datetime, ADD "Code" varchar(50) character set utf8 collate utf8_general_ci, ADD "Arg" int(11) not null default 0, ADD "Type" int(11) not null default 1, ADD "GroupID" int(11) not null default 0, ADD index "GroupID" (GroupID), ADD index "Code" (Code), ADD index "ClassName" (ClassName))
    Line 261 of MySQLDatabase.php
    o MySQLDatabase->alterTable(Permission,Array,Array,Array,Array,Array,)
    Line 186 of Database.php
    o SS_Database->endSchemaUpdate()
    Line 199 of DatabaseAdmin.php
    o DatabaseAdmin->doBuild(1)
    Line 1028 of install.php
    o Installer->install(Array)
    Line 193 of install.php

    Regards

    Tony

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: installation problems Link to this post

    Hmm, I've never seen that happen before and I notice you're using MAMP. I've used MAMP plenty of times with SilverStripe with no problems.

    Which version of MAMP are you using?

    Have you tried installing before, and are you installing onto a database that already exists? This may be why MySQL complains.

    Sean

    1431 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.