Hi,
I have done this before but I seem to be struggling to get this to work.
My approach is - export DB - cp directory - search for old machine www.foo.com and replace with new site - tar directory up - copy both to new machine - untar directory on new machine - create DB on new machine - create user on new machine - import mysql -u root -p <DB> <dump.sql
However have the error
/Notice/: unserialize(): Error at offset 27410 of 57720 bytes in /DrupalDatabaseCache->prepareItem()/ (line /401/ of //home/user1/drupal-7.0/includes/cache.inc/).
///PDOException/: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1: SELECT * FROM {menu_router} WHERE path IN () ORDER BY fit DESC LIMIT 0, 1; Array ( ) in /menu_get_item()/ (line /443/ of //home/user1/pmi/drupal-7.0/includes/menu.inc/).
Similar to http://drupal.org/node/1114304
Any ideas. Thanks, Iain
On 10/09/11 15:42, Iain Wiseman wrote:
Hi,
/Notice/: unserialize(): Error at offset 27410 of 57720 bytes in /DrupalDatabaseCache->prepareItem()/ (line /401/ of //home/user1/drupal-7.0/includes/cache.inc/).
///PDOException/: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1: SELECT * FROM {menu_router} WHERE path IN () ORDER BY fit DESC LIMIT 0, 1; Array ( ) in /menu_get_item()/ (line /443/ of //home/user1/drupal-7.0/includes/menu.inc/).
Similar to http://drupal.org/node/1114304
Maybe this is just because of the first time use as the system does come up. However it then barfs with
/Warning/: Invalid argument supplied for foreach() in /marinelli_get_banners()/ (line /286/ of //home/user1/drupal-7.0/sites/all/themes/marinelli/template.php/).
Iain
I'm not that up on Drupal 7, but i've seen a lot of those types of things on 6 until cache is cleared.
-Don-
On 9/10/2011 12:13 AM, Iain Wiseman wrote:
On 10/09/11 15:42, Iain Wiseman wrote:
Hi,
/Notice/: unserialize(): Error at offset 27410 of 57720 bytes in /DrupalDatabaseCache->prepareItem()/ (line /401/ of //home/user1/drupal-7.0/includes/cache.inc/).
///PDOException/: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1: SELECT * FROM {menu_router} WHERE path IN () ORDER BY fit DESC LIMIT 0, 1; Array ( ) in /menu_get_item()/ (line /443/ of //home/user1/drupal-7.0/includes/menu.inc/).
Similar to http://drupal.org/node/1114304
Maybe this is just because of the first time use as the system does come up. However it then barfs with
/Warning/: Invalid argument supplied for foreach() in /marinelli_get_banners()/ (line /286/ of //home/user1/drupal-7.0/sites/all/themes/marinelli/template.php/).
Iain
Did you try clearing your cache before dumping the DB? On Sep 9, 2011 9:58 PM, "Iain Wiseman" iwiseman@bibble.co.nz wrote:
Hi,
I have done this before but I seem to be struggling to get this to work.
My approach is
- export DB
- cp directory
- search for old machine www.foo.com and replace with new site
- tar directory up
- copy both to new machine
- untar directory on new machine
- create DB on new machine
- create user on new machine
- import mysql -u root -p <DB> <dump.sql
However have the error
/Notice/: unserialize(): Error at offset 27410 of 57720 bytes in /DrupalDatabaseCache->prepareItem()/ (line /401/ of //home/user1/drupal-7.0/includes/cache.inc/).
///PDOException/: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1: SELECT * FROM {menu_router} WHERE path IN () ORDER BY fit DESC LIMIT 0, 1; Array ( ) in /menu_get_item()/ (line /443/ of //home/user1/pmi/drupal-7.0/includes/menu.inc/).
Similar to http://drupal.org/node/1114304
Any ideas. Thanks, Iain
Hi,
I had the same problem some days ago. Removing the cache was inefficiency. I saw that the problem was with the "variable" table. I didn't manage to resolve this problem in the table but once your site is copied, you can go to "Configuration/Informations" and Save. I guess this regenerate a new variable table which makes disappear the problem.
If someone find what the problem exactly, I'm interested :)
----- Mail original ----- De: "Iain Wiseman" iwiseman@bibble.co.nz À: support@drupal.org Envoyé: Samedi 10 Septembre 2011 06:55:47 Objet: Re: [support] Copying a site
On 10/09/11 16:53, Steve Kessler wrote:
Did you try clearing your cache before dumping the DB?
Just trying that now.
Well let you know Iain
On 10/09/11 16:53, Steve Kessler wrote:
Did you try clearing your cache before dumping the DB?
Clearing the cache solve the first problem - thanks (stupid me :-) )
However, still seeing the following.
* Notice: Undefined variable: mainmenu in include() (line 69 of /home/user1/drupal-7.0/sites/all/themes/marinelli/templates/page.tpl.php). * Warning: array_merge(): Argument #2 is not an array in theme_get_setting() (line 1175 of /home/user1/drupal-7.0/includes/theme.inc). ... * Warning: array_merge(): Argument #2 is not an array in theme_get_setting() (line 1175 of /home/user1/drupal-7.0/includes/theme.inc). * Notice: unserialize(): Error at offset 3130 of 6882 bytes in views_db_object->load_row() (line 2004 of /home/user1/drupal-7.0/sites/all/modules/views/includes/view.inc). ... * Notice: unserialize(): Error at offset 3257 of 8078 bytes in views_db_object->load_row() (line 2004 of /home/user1/drupal-7.0/sites/all/modules/views/includes/view.inc). * Warning: array_merge(): Argument #2 is not an array in theme_get_setting() (line 1175 of /home/user1/drupal-7.0/includes/theme.inc). ... * Warning: array_merge(): Argument #2 is not an array in theme_get_setting() (line 1175 of /home/user1/drupal-7.0/includes/theme.inc). * Notice: Undefined index: style_plugin in calendar_granularity_path() (line 197 of /home/user1/drupal-7.0/sites/all/modules/calendar/calendar.module). ... * Notice: Undefined index: style_plugin in calendar_granularity_path() (line 197 of /home/user1/drupal-7.0/sites/all/modules/calendar/calendar.module). * Notice: unserialize(): Error at offset 2381 of 2428 bytes in _ctools_export_unpack_object() (line 776 of /home/user1/drupal-7.0/sites/all/modules/ctools/includes/export.inc). ... * Notice: unserialize(): Error at offset 1569 of 1609 bytes in _ctools_export_unpack_object() (line 776 of /home/user1/drupal-7.0/sites/all/modules/ctools/includes/export.inc). * Notice: unserialize(): Error at offset 97 of 1054 bytes in _ctools_export_unpack_object() (line 776 of /home/user1/drupal-7.0/sites/all/modules/ctools/includes/export.inc). * Warning: array_merge(): Argument #2 is not an array in theme_get_setting() (line 1175 of /home/user1/drupal-7.0/includes/theme.inc). ... * Warning: array_merge(): Argument #2 is not an array in theme_get_setting() (line 1175 of /home/user1/drupal-7.0/includes/theme.inc). * Warning: Invalid argument supplied for foreach() in marinelli_get_banners() (line 286 of /home/user1/drupal-7.0/sites/all/themes/marinelli/template.php). / Iain /
Il 10/09/2011 07:07, Iain Wiseman ha scritto:
On 10/09/11 16:53, Steve Kessler wrote:
Did you try clearing your cache before dumping the DB?
Clearing the cache solve the first problem - thanks (stupid me :-) )
However, still seeing the following.
How are you dumping the db? Try with mysqldump:
mysqldump -u <username> -p <dbname> > dump.sql
On 12/09/11 08:26 +0200, Davide Mirtillo wrote:
How are you dumping the db? Try with mysqldump:
mysqldump -u <username> -p <dbname> > dump.sql
Better use the --default-character-set=utf8 option, too, since whithout it can cause problems with the encoding of special characters (Umlaute f.e.).
mysqldump --default-character-set=utf8 -u <username> -p <dbname> > dump.sql
If you can't use mysqldump, you can use the backup and migrate module. http://drupal.org/project/backup_migrate
Have a nice day Rolf