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.

Archive

Our old forums are still available as a read-only archive.

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

Fatal DB error on install from Database.php line 397


Reply

4 Posts   1148 Views

Avatar
gjenkins

5 December 2007 at 12:49pm (Last edited: 5 December 2007 12:50pm), Community Member, 3 Posts

I am doing a install of silverstripe on ubuntu server and get the following error:

Fatal error: DATABASE ERROR: Couldn't run query: CREATE TABLE `UserDefinedForm` ( ID int(11) not null auto_increment, `EmailTo` varchar(50) character set utf8 collate utf8_general_ci, `EmailOnSubmit` tinyint(1) unsigned not null default '0', `SubmitButtonText` varchar(50) character set utf8 collate utf8_general_ci, `OnCompleteMessage` mediumtext character set utf8 collate utf8_general_ci, fulltext `SearchFields` (Title,MenuTitle,Content,MetaTitle,MetaDescription,MetaKeywords), fulltext `TitleSearchFields` (Title), primary key (ID) ) TYPE=MyISAM | Key column 'Title' doesn't exist in table in /var/www/cbis/sapphire/core/model/Database.php on line 397

Has anyone a clue. this happens after the installer has successfully already created 13 other tables.

Avatar
gjenkins

6 December 2007 at 1:53pm Community Member, 3 Posts

I added a debug_print_backtrace() and the result are in the attached file.

Looking at the code in SilverStripe, The problem seems to be that the UserDefinedForm class does not seem to be adding the fields defined in the base classes, specifically from the SiteTree class.

It looks like the function getCMSfields($cms) should build the $fields static variable with the fields from the parent classes. Maybe this is not happening.

I will need to do more debugging. but this problem seems systemic to breaking the entire database model and I can't understand how any thing works.

I am running
ubuntu server version: Ubuntu 6.06.1 LTS
php 5.1.2
MySql: 5.0.22
Apache: 2.0.55

Avatar
Fuzz10

8 December 2007 at 3:59am Community Member, 787 Posts

I had very weird problems with creating the database-structure trying to upgrade to the latest SS version with PHP version 5.1.2.

So if you can , try upgrading PHP to 5.2.

Avatar
gjenkins

8 December 2007 at 5:14am Community Member, 3 Posts

That error was with version 2.2