logo       

Re: Fatal error: Call to undefined function: pg_connect(): msg#00045

Subject: Re: Fatal error: Call to undefined function: pg_connect()
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@xxxxxxxxxxxxxxxx> wrote:

Hi emdee,

    which database Drupal will use depends on the database
specified 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@xxxxxxxxx>:


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@xxxxxxxxxxxxxxxx
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



--
[ Drupal support list | http://lists.drupal.org/ ]



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe