Attempting an upgrade from 4.4.2 to 4.5.x
Postgres 7.3 and PHP 4.1.2 (ancient but I am stuck with it)

When I run the update script I get no output other than the following error:

Fatal error: Call to undefined function: pg_query() in /home/awg/public_html/includes/database.pgsql.inc on line 104

I have followed all the advised upgrade procedures:

- disabled non-core modules
- backed up database
- untarred clean tree of 4.5.0,1,2 (tried all of them)
- configured .htaccess and php.conf properly
- manually added the two tables as per update page instructions

I know that 4.4. used PEAR, and that 4.5 uses the new database.pgsql.in, is there something that is incompatible with my environment?

The error makes it seam that php isn't configured with pgsql support, but I verified with phpinfo that it was working. And there are other psql php scripts running on the box.

I spent hours scouring the drupal.org posts and issues, there were several similar problems with postgres, and I tried many of the suggestions, but have not gotten anywhere. I would like to get to 4.5 in hopes of eventually getting to 4.6. But with all the bugs the upgrade path for postgres users is brutal.

Comments

phacka’s picture

replace pg_query() with pg_exec(), pg_query() is php 4.2+

hystrix’s picture

Priority: Critical » Normal

Thanks for mentioning this phacka

I found that there were quite a few function calls that were new to php 4.2.x, which caused Drupal 4.5 to not work with postgres. I corrected a few of them, but gave up when I was finally given the opportunity to move the site to a host with a php 4.3, and then I was able to run the updates.

Either all the php => 4.2 functions need to be removed in database.pgsql.inc, or php 4.2.x needs to be made a requirement for Drupal 4.5.x with Postgres. I think its perfectly reasonable to drop 4.1 support, since php 4.1.x is circa 2002. Just some of us in certain hosted or corporate situations have less flexibility. In any case the documentation needs to be updated.

In the short run maybe this could be added to the PostgreSQL Specific Guidelines, the System Requirements, and maybe the INSTALL.txt.

I noticed also that the INSTALL.txt distributed with 4.5.2 still states that PostgreSQL is supported by PEAR, which is no longer the case in 4.5.x

Drupal requires a web server, PHP4 (http://www.php.net/) and either
MySQL, PostgreSQL or a database server supported by the PHP PEAR API
(http://pear.php.net/).  Drupal is not yet compatible with PHP5.
forngren’s picture

Status: Active » Postponed
forngren’s picture

Status: Postponed » Closed (fixed)

I misunderstood the word postponed... won't happen again