No thats not it, the database is set correctly in includes/conf.php. ----------- # $db_url = "mysql://user:password@hostname/database"; # $db_url = "pgsql://user:password@hostname/database"; $db_url = "mysql://mydbuser:mypassword@myhost/mydatabasename"; ----------
Thats why I dont get why its calling the pg_connect.
Anyone else know why?
On Wed, 23 Feb 2005 19:42:58 -0800, Djun Kim Djun.Kim@cielosystems.com wrote:
Hi emdee,
which database Drupal will use depends on the databasespecified in your site configuration file. This is probably a file called conf.php in the 'includes' directory of your drupal installation. There is a variable 'db_url'; in your case it should look something like
$db_url = "mysql://user:passwd@localhost/databasename";
where user is the user that the drupal code runs as (usually it's the same as the user that the web server runs as).
Probably when your configuration was restored, the wrongdb_url was selected.
Good luck. DjunQuoting emdeex emdeex@gmail.com:
I've just had a server restored and now my drupal database is giving this error when I try to access the site:
Fatal error: Call to undefined function: pg_connect() in /home/stonetil/public_html/includes/database.pgsql.inc on line 28
I see that this is a PostgreSQL database connection routine, but I don't have postgresql installed. Ive always used MySQL.
Why is drupal calling this routine, and how can I make it go back to using MySQL?
The include database.inc seems to indicate that Drupal is looking to set an active database, why? Can I override it?
thanks emdee -- [ Drupal support list | http://lists.drupal.org/ ]
-- Djun M. Kim, Director djun.kim@cielosystems.com Cielo Systems Inc. http://www.cielosystems.com Strategic Software Research Tel: (604) 739-3941 302 - 1298 10th Avenue West FAX: (604) 739-3943 Vancouver, BC, V6H 1J4 Mobile:(778) 895-1379
Which version of Drupal are you using? Are you sure you don't have a more site specific configuration file which is setting $db_url differently than the setting in conf.php?
There is only one way for database.pgsql.inc to get included and called, and that is if $db_type is not "mysql" (see approximatley line 108 of includes/database.inc depeneding on your version -- I'm looking at 4.5.2).
Please carefully re-read the INSTALL.txt file for whichever version of Drupal you have installed. Also view the following links:
http://drupal.org/node/260 http://drupal.org/node/3710 http://drupal.org/node/275
-- Chris Johnson
emdeex wrote:
No thats not it, the database is set correctly in includes/conf.php.
# $db_url = "mysql://user:password@hostname/database"; # $db_url = "pgsql://user:password@hostname/database"; $db_url = "mysql://mydbuser:mypassword@myhost/mydatabasename";
Thats why I dont get why its calling the pg_connect.
Anyone else know why?
On Wed, 23 Feb 2005 19:42:58 -0800, Djun Kim Djun.Kim@cielosystems.com wrote:
Hi emdee,
which database Drupal will use depends on the databasespecified in your site configuration file. This is probably a file called conf.php in the 'includes' directory of your drupal installation. There is a variable 'db_url'; in your case it should look something like
$db_url = "mysql://user:passwd@localhost/databasename";
where user is the user that the drupal code runs as (usually it's the same as the user that the web server runs as).
Probably when your configuration was restored, the wrong db_url was selected.
Good luck.
Djun
Quoting emdeex emdeex@gmail.com:
I've just had a server restored and now my drupal database is giving this error when I try to access the site:
Fatal error: Call to undefined function: pg_connect() in /home/stonetil/public_html/includes/database.pgsql.inc on line 28
I see that this is a PostgreSQL database connection routine, but I don't have postgresql installed. Ive always used MySQL.
Why is drupal calling this routine, and how can I make it go back to using MySQL?
The include database.inc seems to indicate that Drupal is looking to set an active database, why? Can I override it?
thanks emdee -- [ Drupal support list | http://lists.drupal.org/ ]
-- Djun M. Kim, Director djun.kim@cielosystems.com Cielo Systems Inc. http://www.cielosystems.com Strategic Software Research Tel: (604) 739-3941 302 - 1298 10th Avenue West FAX: (604) 739-3943 Vancouver, BC, V6H 1J4 Mobile:(778) 895-1379
Just for the record, I got it working, and heres how.
I set the variable in database.inc, to $db_type = "mysql";
That got the code using the right database include. But there were still problems.
Finally I had to hard code some of the variables in database.mysql.inc, such as $connection, and the mysql_select_db with the correct database settings.
Once I got that right, Drupal started working just like before the server rebuild.
I dont know why it needed this, but thats one way to fix it if it happens to you.
Cheerio.
On Thu, 24 Feb 2005 09:41:23 -0600, Chris Johnson chris@tinpixel.com wrote:
Which version of Drupal are you using? Are you sure you don't have a more site specific configuration file which is setting $db_url differently than the setting in conf.php?
There is only one way for database.pgsql.inc to get included and called, and that is if $db_type is not "mysql" (see approximatley line 108 of includes/database.inc depeneding on your version -- I'm looking at 4.5.2).
Please carefully re-read the INSTALL.txt file for whichever version of Drupal you have installed. Also view the following links:
http://drupal.org/node/260 http://drupal.org/node/3710 http://drupal.org/node/275
-- Chris Johnson
emdeex wrote:
No thats not it, the database is set correctly in includes/conf.php.
# $db_url = "mysql://user:password@hostname/database"; # $db_url = "pgsql://user:password@hostname/database"; $db_url = "mysql://mydbuser:mypassword@myhost/mydatabasename";
Thats why I dont get why its calling the pg_connect.
Anyone else know why?
On Wed, 23 Feb 2005 19:42:58 -0800, Djun Kim Djun.Kim@cielosystems.com wrote:
Hi emdee,
which database Drupal will use depends on the databasespecified in your site configuration file. This is probably a file called conf.php in the 'includes' directory of your drupal installation. There is a variable 'db_url'; in your case it should look something like
$db_url = "mysql://user:passwd@localhost/databasename";
where user is the user that the drupal code runs as (usually it's the same as the user that the web server runs as).
Probably when your configuration was restored, the wrong db_url was selected.
Good luck.
Djun
Quoting emdeex emdeex@gmail.com:
I've just had a server restored and now my drupal database is giving this error when I try to access the site:
Fatal error: Call to undefined function: pg_connect() in /home/stonetil/public_html/includes/database.pgsql.inc on line 28
I see that this is a PostgreSQL database connection routine, but I don't have postgresql installed. Ive always used MySQL.
Why is drupal calling this routine, and how can I make it go back to using MySQL?
The include database.inc seems to indicate that Drupal is looking to set an active database, why? Can I override it?
thanks emdee -- [ Drupal support list | http://lists.drupal.org/ ]
-- Djun M. Kim, Director djun.kim@cielosystems.com Cielo Systems Inc. http://www.cielosystems.com Strategic Software Research Tel: (604) 739-3941 302 - 1298 10th Avenue West FAX: (604) 739-3943 Vancouver, BC, V6H 1J4 Mobile:(778) 895-1379