Help with exporting drupal on postgre from live server onto MAC

elvin's picture

Hello guys. I have been working with standart drupal/mysql for quite some time and have never had a problem even with migrating back and forth on the server and locally.

Recently i got a project of a drupal site that was developed on Postgresql and i need to develop a new theme, work with the functionality and do some testing.

I got the files on my mac and everything is ok besides the database.

I have postgresql installed, pgadmin and the phpPGadmin interface too but i cant seem to get it right.

I downloaded an sql dump file from the live phpPGadmin and when i try to import it through the PGadmin app on my mac it fails. When i run the sql on the local phpPGadmin it imports everything but then when i navigate to the local drupal installation it shows this:

Notice: unserialize() [function.unserialize]: Error at offset 0 of 40717 bytes in /Users/elvin/Sites/whsnj/includes/cache.inc on line 447

Notice: unserialize() [function.unserialize]: Error at offset 0 of 266291 bytes in /Users/elvin/Sites/whsnj/includes/cache.inc on line 447

Warning: Invalid argument supplied for foreach() in /Users/elvin/Sites/whsnj/includes/module.inc on line 212

Warning: array_keys() [function.array-keys]: The first argument should be an array in /Users/elvin/Sites/website/includes/module.inc on line 89

Notice: unserialize() [function.unserialize]: Error at offset 0 of 266291 bytes in /Users/elvin/Sites/website/includes/cache.inc on line 447

Warning: Invalid argument supplied for foreach() in /Users/elvin/Sites/website/includes/module.inc on line 212

Warning: array_keys() [function.array-keys]: The first argument should be an array in /Users/elvin/Sites/website/includes/module.inc on line 89

Fatal error: Call to undefined function system_run_automated_cron() in /Users/elvin/Sites/website/includes/common.inc on line 2619

Any ideas or suggestions on what to do?

Thanks

Comments

Postgres versions?

desoi's picture

Is the Postgres version on your Mac the same as the one on the server? What version? Is this Drupal 7?

Check bytea_output

dgv's picture

Based on the error message, it fails to convert cache.data which is a value of type BYTEA (blob)
The usual suspect in this case is the bytea_output parameter, which is hex by default for PostgreSQL 9.0 or higher, but which D7 sets to escape (the old default value) when it initializes the DB.

If you have created the DB manually it's plausible that this initialization never occurred.

You can do it manually with this SQL command:

ALTER DATABASE database_name SET bytea_output=escape;

Postgresql

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week