Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Install problems related to MySQL and .htaccess

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: 1945 Views
  • nethawk
    Avatar
    Community Member
    2 Posts

    Install problems related to MySQL and .htaccess Link to this post

    Hi,
    i tried to install the cms, but have some problems i want to note and i need help with.

    First .htaccess:
    I get Internal Server Error, as the .htaccess contains:
    <IfModule mod_dir.c>
    DirectorySlash Off
    </IfModule>
    but my apache installation doesn't contain this module.

    I removed this part from the .htaccess file to be able to continue
    the installation.

    The MySQL problem:
    I tested this with Version 2.3.0-rc2, the stable version and the nightly build:
    Version of MySQL: MySQL 5.0.45-log
    Apache/1.3.41 (Unix) mod_perl/1.30 PHP/5.2.6 mod_fastcgi/2.4.6 mod_ssl/2.8.31 OpenSSL/0.9.8i

    After entering the username, password data for MySQL and starting the Install process
    i get errors related to MySQL:

    [User Error] Couldn't run query: insert into `SiteTree_versions` SET `ShowInMenus` = 1, `ShowInSearch` = 1, `Status` = 'Published', `CanViewType` = 'Inherit', `CanEditType` = 'Inherit', `Title` = 'Contact Us', `Content` = 'You can fill this page out with your own content, or delete it and create your own pages.', `URLSegment` = 'contact-us', `LastEdited` = now(), `Created` = now(), `ClassName` = 'Page', `MenuTitle` = null, `MetaTitle` = null, `MetaDescription` = null, `MetaKeywords` = null, `ExtraMeta` = null, `HomepageForDomain` = null, `ProvideComments` = '0', `Sort` = '0', `LegacyURL` = null, `HasBrokenFile` = '0', `HasBrokenLink` = '0', `ReportClass` = null, `ToDo` = null, `ParentID` = '0', `Version` = 1, `RecordID` = 3, `AuthorID` = 0 Incorrect key file for table './silvers/SiteTree_versions.MYI'; try to repair it
    POST /install.php

    Line 394 in /www/kunden/silvers.xtremeweb.de/ftp/htdocs/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: insert into `SiteTree_versions` SET `ShowInMenus` = 1, `ShowInSearch` = 1, `Status` = 'Published', `CanViewType` = 'Inherit', `CanEditType` = 'Inherit', `Title` = 'Contact Us', `Content` = '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>', `URLSegment` = 'contact-us', `LastEdited` = now(), `Created` = now(), `ClassName` = 'Page', `MenuTitle` = null, `MetaTitle` = null, `MetaDescription` = null, `MetaKeywords` = null, `ExtraMeta` = null, `HomepageForDomain` = null, `ProvideComments` = '0', `Sort` = '0', `LegacyURL` = null, `HasBrokenFile` = '0', `HasBrokenLink` = '0', `ReportClass` = null, `ToDo` = null, `ParentID` = '0', `Version` = 1, `RecordID` = 3, `AuthorID` = 0 Incorrect key file for table './silvers/SiteTree_versions.MYI'; try to repair it
    Line 394 of MySQLDatabase.php
    * MySQLDatabase->databaseError(Couldn't run query: insert into `SiteTree_versions` SET `ShowInMenus` = 1, `ShowInSearch` = 1, `Status` = 'Published', `CanViewType` = 'Inherit', `CanEditType` = 'Inherit', `Title` = 'Contact Us', `Content` = '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>', `URLSegment` = 'contact-us', `LastEdited` = now(), `Created` = now(), `ClassName` = 'Page', `MenuTitle` = null, `MetaTitle` = null, `MetaDescription` = null, `MetaKeywords` = null, `ExtraMeta` = null, `HomepageForDomain` = null, `ProvideComments` = '0', `Sort` = '0', `LegacyURL` = null, `HasBrokenFile` = '0', `HasBrokenLink` = '0', `ReportClass` = null, `ToDo` = null, `ParentID` = '0', `Version` = 1, `RecordID` = 3, `AuthorID` = 0 | Incorrect key file for table './silvers/SiteTree_versions.MYI'; try to repair it,256)
    Line 102 of MySQLDatabase.php
    * MySQLDatabase->query(insert into `SiteTree_versions` SET `ShowInMenus` = 1, `ShowInSearch` = 1, `Status` = 'Published', `CanViewType` = 'Inherit', `CanEditType` = 'Inherit', `Title` = 'Contact Us', `Content` = '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>', `URLSegment` = 'contact-us', `LastEdited` = now(), `Created` = now(), `ClassName` = 'Page', `MenuTitle` = null, `MetaTitle` = null, `MetaDescription` = null, `MetaKeywords` = null, `ExtraMeta` = null, `HomepageForDomain` = null, `ProvideComments` = '0', `Sort` = '0', `LegacyURL` = null, `HasBrokenFile` = '0', `HasBrokenLink` = '0', `ReportClass` = null, `ToDo` = null, `ParentID` = '0', `Version` = 1, `RecordID` = 3, `AuthorID` = 0)
    Line 416 of Database.php
    * Database->manipulate(Array)
    Line 110 of DB.php
    * DB::manipulate(Array)
    Line 806 of DataObject.php
    * DataObject->write()
    Line 915 of SiteTree.php
    * SiteTree->requireDefaultRecords()
    Line 187 of DatabaseAdmin.php
    * DatabaseAdmin->doBuild(1)
    Line 801 of install.php
    * Installer->install(Array)
    Line 123 of install.php

    After reloading the page, i get the next error:

    [User Error] Couldn't run query: INSERT INTO `File` SET ClassName = 'Image', ParentID = 1, OwnerID = 0, Name = 'SilverStripeLogo.png', Filename = 'assets/Uploads/SilverStripeLogo.png', Created = NOW(), LastEdited = NOW(), Title = 'SilverStripeLogo.png' Incorrect key file for table './silvers/File.MYI'; try to repair it
    POST /install.php

    Line 394 in /www/kunden/silvers.xtremeweb.de/ftp/htdocs/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: INSERT INTO `File` SET ClassName = 'Image', ParentID = 1, OwnerID = 0, Name = 'SilverStripeLogo.png', Filename = 'assets/Uploads/SilverStripeLogo.png', Created = NOW(), LastEdited = NOW(), Title = 'SilverStripeLogo.png' Incorrect key file for table './silvers/File.MYI'; try to repair it
    Line 394 of MySQLDatabase.php
    * MySQLDatabase->databaseError(Couldn't run query: INSERT INTO `File` SET ClassName = 'Image', ParentID = 1, OwnerID = 0, Name = 'SilverStripeLogo.png', Filename = 'assets/Uploads/SilverStripeLogo.png', Created = NOW(), LastEdited = NOW(), Title = 'SilverStripeLogo.png' | Incorrect key file for table './silvers/File.MYI'; try to repair it,256)
    Line 102 of MySQLDatabase.php
    * MySQLDatabase->query(INSERT INTO `File` SET ClassName = 'Image', ParentID = 1, OwnerID = 0, Name = 'SilverStripeLogo.png', Filename = 'assets/Uploads/SilverStripeLogo.png', Created = NOW(), LastEdited = NOW(), Title = 'SilverStripeLogo.png',256)
    Line 97 of DB.php
    * DB::query(INSERT INTO `File` SET ClassName = 'Image', ParentID = 1, OwnerID = 0, Name = 'SilverStripeLogo.png', Filename = 'assets/Uploads/SilverStripeLogo.png', Created = NOW(), LastEdited = NOW(), Title = 'SilverStripeLogo.png')
    Line 160 of Folder.php
    * Folder->constructChild(SilverStripeLogo.png)
    Line 107 of Folder.php
    * Folder->syncChildren()
    Line 112 of Folder.php
    * Folder->syncChildren()
    Line 107 of Filesystem.php
    * Filesystem::sync()
    Line 811 of install.php
    * Installer->install(Array)
    Line 123 of install.php

    For sure, the initial MySQL installation should succeed.

    Thanks

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Install problems related to MySQL and .htaccess Link to this post

    Have you tried repairing the database? That's an odd issue - it looks like mysql didn't create the table correctly. Drop and rebuild might be quicker.

  • nethawk
    Avatar
    Community Member
    2 Posts

    Re: Install problems related to MySQL and .htaccess Link to this post

    Checking the content of the tables showed, that the missing entries from the errorpages
    were created. Why ? I don't know.

    I can't be sure, that all my tables contain the correct content.

    Probably it would be a good idea to

    1. Create a php script, that queries MySQL, if all data are in the tables.
    2. include a MySQL dump in the distribution.

    Probably someone could send me a database dump of a clean installation ?

    Thanks

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