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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

[solved] server error when trying to copy database


Go to End


7 Posts   2110 Views

Avatar
marcink

Community Member, 89 Posts

30 March 2011 at 11:10pm

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

Forum Moderator, 1899 Posts

31 March 2011 at 5:27am

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

Community Member, 89 Posts

31 March 2011 at 7:29am

Edited: 31/03/2011 7:30am

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
(deleted)

Community Member, 473 Posts

31 March 2011 at 9:17am

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

Avatar
marcink

Community Member, 89 Posts

31 March 2011 at 9:44pm

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

Forum Moderator, 1899 Posts

31 March 2011 at 9:57pm

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

Community Member, 89 Posts

31 March 2011 at 10:06pm

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