By Dubber Dan on
Hi folks,
I've just moved our domain to a new host but am having problems getting my site working. The steps I followed were:
1. Create backups of existing site including databases and a full home directory download
2. Changed nameservers
3. Upload drupal codebase
4. Upload modules, theme & files directory
5. Created new database
6. Imported database via PHPMyAdmin
But I'm getting loads of errors when I go to the site at www.westburygp.co.uk
Can somoeone take a look and let me know whats going on?
Comments
Thoughts...
#1 seems good, #3 and #4 sound a bit odd in comparison... I would have expected to hear "restored all files" or something like that. Are you confident that "you have all of the right files in the right places?" Did ownership / permissions come through the backup/restore in good order?
Did the MySQL DB version change? Did you make sure you backed up / restored specifying a UTF8 character set? I went through a MySQL 4.0.x to MySQL 5.0.x, specified the UTF8 character set for both the backup and restore, conversion was a complete success.
Looks like you did not successfully move the database
What the code is looking for seems not to be there. Lots of unknown columns, fields, etc. Perhaps you might take a look at your database with phpmyadmin and see whether the tables are set up at all.
When I move a database, I use phpMyAdmin and select the DROP TABLE option when I export.
I assume that you ran your codebase with an un-exported naked brand new database first to make sure there were no surprises there? Sometimes that reveals things like a change in PHP version or capabilities that mess you up.
Good luck.
:)
did you edit settings.php to
did you edit settings.php to use your new sql server's info?
$db_url = 'mysql://user:pass@localhost/databasename';
some webhosts have seperate sql servers so they are not on the local host you need to change the server address to your webhost's sql server. hope this helps
sql settings
did you edit settings.php to use your new sql server's info?
$db_url = 'mysql://user:pass@localhost/databasename';
some webhosts have seperate sql servers so they are not on the local host you need to change the server address to your webhost's sql server. hope this helps
Thanks for the replies folks
Thanks for the replies folks. I think I'm gonna scrub it and start again, doing the following:
1. Upload drupal
2. Create empty database
3. Go to domain to test a clean install
4. Import backup database
5. Upload files directory, theme, etc
6. Edit settings.php
7. Go to domain to test site
Did a clean install of a new
Did a clean install of a new instance of Drupal and that worked fine, able to create the 1st user etc.
Then imported (via MyPHPAdmin) the backed up database for my site and now get the following errors when going to www.westburygp.co.uk:
Anyone got any suggestions?
Anyone got any suggestions?
Since no one else speaks up...
Hi Dan-
The steps you outline seem a bit off target to me...
I would suggest:
1. Create empty database
2. Import backed-up database
3. Upload backed-up directory structure
4. Edit settings.php to point at the new database
5. Go to domain to test site
My steps one and two were
My steps one and two were only there to test that a clean install of drupal works, which it did. If I then replace the database with my back up I get the errors above. I've just followed your steps (using 2 different database backups) and I still get the errors above.
MySQL Versions?
What version of MySQL are you coming from / importing to?
Did you specify utf8 be the character set for both the backup and restore? I have successfully migrated MySQL 4.0.x to MySQL 5.0.x specifying utf8 be the character set on both the backup and restore command.
But... I would not think you would get that severe of an error if it were simply a character set issue.
Possibly post the exact syntax you used for both the backup and restore - maybe something is glaringly wrong.
Oh, and I assume that once you had clean Drupal up and running, you did not restore the settings.php file as it already had the correct settings to connect to the new MySQL server, correct?
Not sure what I'm coming
Not sure what I'm coming from, but I think it was 4. I'm going to 5.
I did specify utf8 for the restore, but not sure about the backup as it was one generated by the previous host. I've successfully restored from these sort of backups before and moved another domain between the same hosts using this method before.
hhhmmm
Moving from the same server to the same server? (Those other domains?)
How about checking to see that various tables actually look OK.
Unknown column 'referer' in 'field list' query: INSERT INTO watchdogSo check the watchdog table and see if it even has a referer col, etc... I would just do:
select * from watchdog;The other domains were moved
The other domains were moved from the same old host to the same new host as this instance, using the same method as this.
I've looked into the tables and they seem to be right. There are plenty of nodes and I can see the titles, contents, etc of them.
Checking the Watchdog I can't see anything for "referer". In PHPMyAdmin would that be in the field list?
Yes, a col of the watchdog table
Yes, I believe that SQL is looking for the watchdog table to have a referer col. I will snoop inside my Drupal databases soon to compare.
Do your other databases that are working properly have such a col, or maybe a difference in the cols?
Hmmm, very odd... My other
Hmmm, very odd...
My other sites do have a referer column, but none of my backups for this site do. Yet I'm positive that I've used one of the old ones for restoring before moving host.
Is it possible to create the referer column somehow?
I would certainly try...
Try and see if it makes things better. I doubt it had any constraints on the col.
Another Idea to try
Make a copy of the backup file you wish to restore, edit it and see if you can get the syntax adjusted properly to simply add that one col. I think that it likely involves the table definition (DDL), but am unsure if it involves the actual data rows. Have to check and see if they are mapped, each col, to a specific named col or if it is simply "next col... next col..." Given the latter, then insert an empty place holder for the new col.
This idea I think is better given the fact that it is likely to produce a DB schema that is closer to the Drupal standard. (that one col where it should be, rather than as the last col.)
Ermmmmmm, any pointers on
Ermmmmmm, any pointers on how to do all that?
Since you have moved to a new server...
The existing watchdog table is basically useless. So I suggest modifying the DDL that creates the table, and not import anything from the old server. From a backup of one of my sites:
That backup is of Drupal 5.2!!!
So, I suspect the referer line is missing in your version. Modify the DDL, and cut out the lines indicated to be cut.
Give that a try! Hope it works! ;-)
Thanks again for the reply,
Thanks again for the reply, but I'm lost as to what your actually saying I need to do! Can you give me some idiots steps to follow as I've never really delved into databases so don't even know where to start?
Steps...
1) Make a copy of the database backup file.
2) Make sure the table definition for watchdog is like I pasted in. I suspect it is missing the referer column.
3) Note the lines I said to cut, and cut those. Those are restoring entries to the watchdog table, which existing data is useless for that table and is safe to dump.
4) Save / Exit / and build the database from that customized version.
Better?
That's sounding great
That's sounding great thanks. Just one more thing. What software do I do the editing in, as I tried Crimson Editor and it's cropped some of the lines as they are too long, and notepad is just random characters?
Visual SlickEdit but $$$
I happen to use Visual SlickEdit as my main text editor while in GUI mode.
I suppose a good Linux text mode editor would edit it without messing up the file. Happen to have nano handy? If your distro did not install it by default, hopefully they have it packaged and you can easily add the package.
Kate is an option too
I recall using Kate on Linux (GUI) when I did not have Visual SlickEdit available. I think Kate requires KDE. It has been a while...
Erm, I don't use Linux
Erm, I don't use Linux, it's just that my hosting is Linux based.
SSH to the server?
Do you have SSH capabilities on the server? Edit it directly on the server.
If not, best get a real text editor for your computer. Notepad is NOT a text editor! ;-)
Has taken me ages to get
Has taken me ages to get round to this, but have added in the referrer line to the database, then re-uploaded. Am now just getting the one error thrown up:
Fatal error: Call to undefined function block_list() in /home/.krone/dubber/westburygp.co.uk/includes/theme.inc on line 936www.westburygp.co.uk
So that's progress of sorts. What next folks?
Seems the backup of files as well as database is questionable
Greetings Dan- I had been thinking of you now and then. I am indeed glad to see you got past that error.
Since that appears to be a core Drupal file, I suggest you unpack the official tar of what ever version you are running on and compare those files to the files from your backup.
I recall you had trouble editing the database file, and Diffs I usually do again with Visual SlickEdit. If you want me to have a look at it, please contact me directly to tell me where I can fetch a backup file set from.
Any files seeming not the official release version I would evaluate, and perhaps uploading the official version will make the difference.
I managed to get the
I managed to get the database edited after I downloaded Textpad (www.textpad.com) which got me past the initial set of errors, so thanks for that.
I need to get a temporary page up for th site so people know what's what, so was going to move the drupal install to a subfolder. Once I've done that I'll be in touch ;-)
You could...
You could edit the .htaccess file in the web root and specify index.html as the default rather than index.php. We could manually specify index.php to work on the site. I think that would be enough editing. When we run Drupal parallel to an existing static HTML site, I edit one of the core Drupal files, but I do not think that necessary in this case.
Just a thought...