Jump to:

1131 Posts in 1965 Topics by 402 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Error logging in to backend after upgrade to 2.3

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 1530 Views
  • gkinane
    Avatar
    Community Member
    22 Posts

    Error logging in to backend after upgrade to 2.3 Link to this post

    Hi
    When I attempt to login to admin I get an error "Website cannot process etc". I added the "dev" function to the _config.php and now I get

    [User Error] Bad class to singleton() - SubscribeForm

    During the upgrade (/dev/build) process I also get this error :
    User Error] Couldn't run query: ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment'
    GET /dev/build/?flush=1

    Line 394 in /home/beena/public_html/sapphire/core/model/MySQLDatabase.php
    Source

    385    }
    386    
    387    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    388       // try to extract and format query
    389       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    390          $formatter = new SQLFormatter();
    391          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    392       }
    393       
    394       user_error($msg, $errorLevel);
    395    }
    396 }
    397
    398 /**
    399 * A result-set from a MySQL database.
    400 * @package sapphire

    Trace

    * Couldn't run query: ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment'
    Line 394 of MySQLDatabase.php
    * MySQLDatabase->databaseError(Couldn't run query: ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci | ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment',256)
    Line 102 of MySQLDatabase.php
    * MySQLDatabase->query(ALTER TABLE `PageComment` ADD `CommenterURL` varchar(255) character set utf8 collate utf8_general_ci, ADD `AuthorID` int(11) not null default '0', ADD index `AuthorID` (AuthorID), CHANGE `Name` `Name` varchar(200) character set utf8 collate utf8_general_ci)
    Line 206 of MySQLDatabase.php
    * MySQLDatabase->alterTable(PageComment,Array,Array,Array,Array)
    Line 163 of Database.php
    * Database->endSchemaUpdate()
    Line 173 of DatabaseAdmin.php
    * DatabaseAdmin->doBuild(,1)
    Line 81 of DatabaseAdmin.php
    * DatabaseAdmin->build()
    Line 118 of DevelopmentAdmin.php
    * DevelopmentAdmin->build(Object id #7)
    Line 107 of RequestHandler.php
    * RequestHandler->handleRequest(Object id #7)
    Line 122 of Controller.php
    * Controller->handleRequest(Object id #7)
    Line 262 of Director.php
    * Director::handleRequest(Object id #7,Session)
    Line 106 of Director.php
    * Director::direct(dev/build/)
    Line 115 of main.php

    Any help appreciated.

    Regards
    Gerry

  • Ingo
    Avatar
    Forum Moderator
    801 Posts
  • gkinane
    Avatar
    Community Member
    22 Posts

    Re: Error logging in to backend after upgrade to 2.3 Link to this post

    Hi
    I have that there and had it there from the start.
    Regards
    Gerry

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: Error logging in to backend after upgrade to 2.3 Link to this post

    Isn't this a rights issue ?

    ALTER command denied to user 'kumar'@'localhost' for table 'pagecomment',25

  • gkinane
    Avatar
    Community Member
    22 Posts

    Re: Error logging in to backend after upgrade to 2.3 Link to this post

    Hi
    It was a rights issue. The DB did not have "ALTER" capabilities. Thanks for the help.
    Regards
    Gerry

    1530 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.