Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » MySQL problem when moving SS site from Windows development to Linux production

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

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

Page: 1
Go to End
Author Topic: 1933 Views
  • MySQL problem when moving SS site from Windows development to Linux production Link to this post

    Hi everyone,

    I am trying to move a site from my windows dev server (I used the prefab SilverStripe development package installer) to my production Linux hosting. Production hosting is with GoDaddy (don't blame me! someone else chose it!) and it is a shared linux account, typical of many big web hosting environments.

    I have set up the DB and modified my SilverStripe _config.php file appropriately. I can connect to the DB from the command line mysql application using the same details as I have entered in _config.php, and I have imported the sql generated by the mysqldump command on the Windows dev server. I can even see all the tables and their content from the command line mysql app. However, I get the following error when I try and load the site:

    FATAL ERROR: DATABASE ERROR: Couldn't run query: SELECT `SiteTree`.*, `UserDefinedForm`.*, `SubscribeForm`.*, `ArticlePage`.*, `StaffPage`.*, `ErrorPage`.*, `GhostPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `SiteTree`.ID, if(`SiteTree`.ClassName,`SiteTree`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree` LEFT JOIN `UserDefinedForm` ON `UserDefinedForm`.ID = `SiteTree`.ID LEFT JOIN `SubscribeForm` ON `SubscribeForm`.ID = `SiteTree`.ID LEFT JOIN `ArticlePage` ON `ArticlePage`.ID = `SiteTree`.ID LEFT JOIN `StaffPage` ON `StaffPage`.ID = `SiteTree`.ID LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree`.ID LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree`.ID LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree`.ID LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree`.ID WHERE (HomepageForDomain = 'test.twizere.org') ORDER BY Sort LIMIT 1 | Table 'twizereorg_ss.SiteTree' doesn't exist
    At line 386 in /sapphire/core/model/Database.php

    Any ideas? I am volunteering for a charity based in Rwanda, and look at their current website:

    http://www.twizere.org

    So I am keen to get this up for them ASAP. This is my first SS site, so pardon me if the question is rather obvious...

    Any help is appreciated.

  • mememan
    Avatar
    Community Member
    3 Posts

    Re: MySQL problem when moving SS site from Windows development to Linux production Link to this post

    check out:-

    http://doc.silverstripe.com/doku.php?id=silverstripe-on-wamp

    in short either you have to use all lowercase table names or you have to change the dump file manually to use CamelCase EXCEPT for versions tables that have the word 'version in lowercase after the first bit in CamelCase.

    hope that helps

  • Re: MySQL problem when moving SS site from Windows development to Linux production Link to this post

    Thanks for the reply.

    I cant seem to get this right. I know it is a MySQL issue strictly speaking, but maybe someone here can help. From your previous post I assumed that I could configure mysql on the windows box using:

    [mysqld]
    set-variable=lower_case_table_names=2

    in the Server section of my.ini, run db/build again, then perform the mysqldump?

    I have tried this but it doesnt seem to work. Windows MySQL install is still using lowercase table names....

    Or is there a way to have SS on Linux call for the table names using lower case? I cant change the config on the Linux MySQL server unfortunately.

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