Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Error logging in to backend after upgrade to 2.3


Go to End


5 Posts   2598 Views

Avatar
gkinane

Community Member, 22 Posts

14 March 2009 at 10:55pm

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

Avatar
Ingo

Forum Moderator, 801 Posts

15 March 2009 at 7:27am

You'll need the "userforms" module - see http://doc.silverstripe.com/doku.php?id=upgrading:2.3.0

Avatar
gkinane

Community Member, 22 Posts

16 March 2009 at 8:45am

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

Avatar
Fuzz10

Community Member, 791 Posts

17 March 2009 at 1:48am

Isn't this a rights issue ?

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

Avatar
gkinane

Community Member, 22 Posts

17 March 2009 at 2:01am

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