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

MySQL problem when moving SS site from Windows development to Linux production


Reply


3 Posts   1991 Views

Avatar
coupleofcents.com

12 Posts

7 January 2008 at 10:24pm

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:

[url]http://www.twizere.org[/url]

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.

Avatar
mememan

Community Member, 3 Posts

8 January 2008 at 12:10am

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

Avatar
coupleofcents.com

12 Posts

8 January 2008 at 11:09am

Edited: 08/01/2008 12:01pm

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.