Hi all. I need to import an old site (based on a proprietary CMS based on postgres) on drupal 6.x based on mysql.
I have thinked that two $db_url['XXX'] were enough, 1 (default) for mysql and the other (oldweb) for postgres.
But I receive this error when I try to use the connection to postgresql:
*Fatal error*: Cannot redeclare db_status_report() (previously declared in.......
How can I connect to an postgres db if my site run on mysql?
M.
Due to the design of the database layer in Drupal 6 (and less) you can't mix different database engines (that feature is coming in D7).
My suggestion would be to dump the PostgreSQL DB and import it into a MySQL DB, then do the import. The other thing you could do is create your own PostgreSQL connector to use for the import, totally bypassing the Drupal database layer on that database.
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 1/25/2010 8:59 AM, Michel Morelli wrote:
Hi all. I need to import an old site (based on a proprietary CMS based on postgres) on drupal 6.x based on mysql.
I have thinked that two $db_url['XXX'] were enough, 1 (default) for mysql and the other (oldweb) for postgres.
But I receive this error when I try to use the connection to postgresql:
*Fatal error*: Cannot redeclare db_status_report() (previously declared in.......
How can I connect to an postgres db if my site run on mysql?
M.
Michel 'ZioBudda' Morellimichel@ziobuddalabs.net Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ziodrupal.net MSN:michel@ziobuddalabs.it JABBER:michel@ziobuddalabs.it
Jamie Holly ha scritto:
Due to the design of the database layer in Drupal 6 (and less) you can't mix different database engines (that feature is coming in D7).
My suggestion would be to dump the PostgreSQL DB and import it into a MySQL DB, then do the import. The other thing you could do is create your own PostgreSQL connector to use for the import, totally bypassing the Drupal database layer on that database.
Ok, I need to create a connector or better I can use an external DB class for postgress like one of PEAR.
Thanks for the reply.
M.
You could always use the DBTNG module for D6. This will allow you to use the standard Drupal database with the built in DB layer, and initiate a new DB connection using DBTNG and PDO to any other type of database. I have done cross RDBMS pages/modules with this module for Drupal 6 and it works well.
Keep in mind that using this module to connect to the main Drupal database for your site will make open an extra connection to the DB. (probably not a problem for importing data cross RDBMS)
-Mike __________________ Michael Prasuhn 503.512.0822 office mike@mikeyp.net http://mikeyp.net
On Jan 25, 2010, at 6:26 AM, Jamie Holly wrote:
Due to the design of the database layer in Drupal 6 (and less) you can't mix different database engines (that feature is coming in D7).
My suggestion would be to dump the PostgreSQL DB and import it into a MySQL DB, then do the import. The other thing you could do is create your own PostgreSQL connector to use for the import, totally bypassing the Drupal database layer on that database. Jamie Holly
On 1/25/2010 8:59 AM, Michel Morelli wrote:
Hi all. I need to import an old site (based on a proprietary CMS based on postgres) on drupal 6.x based on mysql.
I have thinked that two $db_url['XXX'] were enough, 1 (default) for mysql and the other (oldweb) for postgres.
But I receive this error when I try to use the connection to postgresql:
Fatal error: Cannot redeclare db_status_report() (previously declared in.......
How can I connect to an postgres db if my site run on mysql?
M.
Michel 'ZioBudda' Morelli michel@ziobuddalabs.net
Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ziodrupal.net MSN: michel@ziobuddalabs.it
JABBER:michel@ziobuddalabs.it
-- [ Drupal support list | http://lists.drupal.org/ ]
On Mon, Jan 25, 2010 at 8:59 AM, Michel Morelli michel@ziobuddalabs.it wrote:
How can I connect to an postgres db if my site run on mysql?
I would manipulate the data into mySQL (it's going to take some effort and know-how of both systems), and then import it into Drupal using the table wizard and migrate module (or otherwise just write some import scripts).