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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

[solved] server error when trying to copy database


Reply

7 Posts   1495 Views

Avatar
marcink

30 March 2011 at 11:10pm Community Member, 89 Posts

hi,

when i try to copy my db from localhost to my hosted site, i get this server error:

Server error

Sorry, there was a problem with handling your request.

i checked the _config and the dbhost, pw/login, db name etc. were all changed to match the ones on the new db.

any help?

Avatar
swaiba

31 March 2011 at 5:27am Forum Moderator, 1796 Posts

could read the faq for some debugging methods and that may shed some light on it...
http://www.silverstripe.org/general-questions/show/16055

Avatar
marcink

31 March 2011 at 7:29am (Last edited: 31 March 2011 7:30am), Community Member, 89 Posts

so it was the infamous mysql table names: CamelCase vs. lowercase...

just to reiterate again:
on windows, mysql's tablenames are all lowercase. when copying the database to a ss installation on a linux server, where the table names are CamelCase, very bad things happen. :)

i think this should be at least addressed more broadly by the ss team. i spend hours to debug...

Avatar
simon_w

31 March 2011 at 9:17am Forum Moderator, 474 Posts

Running dev/build does rename tables to the right case.

Avatar
marcink

31 March 2011 at 9:44pm Community Member, 89 Posts

not with me.
of course, after copying the db dev/build was the first thing i did... even before trying to view the site... :)

btw: how would ss know how to rename the tables?? from lowercase to CamelCase?

Avatar
swaiba

31 March 2011 at 9:57pm Forum Moderator, 1796 Posts

well it does have this hidden away in the docs... http://doc.silverstripe.org/sapphire/en/installation/windows-wamp... that mentions...

"Left-click the gauge, then select MySQL -> my.ini. At the very bottom of the file, and add the following to a new line (without the quotes): "lower_case_table_names = 2". Save the file, close Notepad and left-click the gauge, and selected 'Restart all services'. This is used to ease the transition between a Windows-based install and a Linux-based install where case-sensitivity is important."

maybe it could detect windows and make this a requirement during install?

Avatar
marcink

31 March 2011 at 10:06pm Community Member, 89 Posts

yeah, i found it as well after searching the forum (after i identified the problem).
and after changing it, it had no effect.

now, after a second thought - of course - it can only work when you create the db after the change... stupid me... :D