Error in installation of G2 beta / cvs with PostgreSQL db

Kimmo

Joined: 2005-03-31
Posts: 4
Posted: Thu, 2005-03-31 06:28

I am having following errors when trying to make fresh install of G2:

Quote:
(postgres7): select version() (postgres7): select tablename, 'T' from pg_tables where tablename not like 'pg\_%' and schemaname not in ( 'pg_catalog', 'information_schema') union select viewname, 'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog', 'information_schema')
Warning: pg_exec() query failed: ERROR: Attribute 'schemaname' not found in /home/kvuorine/public_html/new_gallery/lib/adodb/drivers/adodb-postgres64.inc.php on line 722
-19: ERROR: Attribute 'schemaname' not found

Fatal error: Call to undefined function: debug_backtrace() in /home/kvuorine/public_html/new_gallery/lib/adodb/adodb-lib.inc.php on line 852

PostgreSQL 7.2.3 / PHP 4.2.2

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-04-01 08:06

Hrm. Looks like some issues with the ADOdb library. Let's sort it out.

What do you see if you do a "select version();" in Postgres?

If you can provide me with ssh access to your server, that would probably speed up the process considerably. I'll need to figure out what the bug is in ADOdb and submit it back to them to have them fix it. Thanks!

 
Kimmo

Joined: 2005-03-31
Posts: 4
Posted: Fri, 2005-04-01 11:00
bharat wrote:
Hrm. Looks like some issues with the ADOdb library. Let's sort it out.

What do you see if you do a "select version();" in Postgres?

gallery2=# select version();
version
---------------------------------------------------------------------------------------------------------
PostgreSQL 7.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

bharat wrote:
If you can provide me with ssh access to your server, that would probably speed up the process considerably. I'll need to figure out what the bug is in ADOdb and submit it back to them to have them fix it. Thanks!

For that I would have to improve security in my systems and that will take some time but it is a possibility.

Thanks,
Kimmo

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-04-04 22:26

Hm. Ok, which Postgres driver did you choose? "postgres" or "postgres7" ? (check your config.php).

Then, edit lib/adodb/drivers/adodb-postgres64.inc.php and on line 204, temporarily change:

                 $info = $this->ServerInfo();

to:

                 $info = $this->ServerInfo();
                 print "XXX LOOK HERE";
                 print_r($info);

Then when you try running the installer and it fails, look at your HTML source and you should be able to find this new block of text. Paste that here, it'll give us an idea of why the MetaTables function is not working properly.

Thanks!

 
Kimmo

Joined: 2005-03-31
Posts: 4
Posted: Wed, 2005-04-06 09:32
bharat wrote:
Hm. Ok, which Postgres driver did you choose? "postgres" or "postgres7" ? (check your config.php).

config.php says postgres7 which I also selected during installation.

bharat wrote:
Then, edit lib/adodb/drivers/adodb-postgres64.inc.php and on line 204, temporarily change:

                 $info = $this->ServerInfo();

to:

                 $info = $this->ServerInfo();
                 print "XXX LOOK HERE";
                 print_r($info);

Then when you try running the installer and it fails, look at your HTML source and you should be able to find this new block of text. Paste that here, it'll give us an idea of why the MetaTables function is not working properly.

XXX LOOK HEREArray
(
[description] => PostgreSQL 7.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
[version] => 7.2.3
)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-04-08 05:19

Ok, round 2. Replace it with this code:

var_dump($info); 
printf("%s is >= %s? %s", $info['version'], 7.3, $info['version'] >= 7.3 ? "yes" : "no"); 

What does that say?

 
Kimmo

Joined: 2005-03-31
Posts: 4
Posted: Fri, 2005-04-08 07:35
bharat wrote:
var_dump($info); 
printf("%s is >= %s? %s", $info['version'], 7.3, $info['version'] >= 7.3 ? "yes" : "no"); 

What does that say?

array(2) {
["description"]=>
string(103) "PostgreSQL 7.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)"
["version"]=>
string(5) "7.2.3"
}
7.2.3 is >= 7? yes

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-04-09 00:59

Huh. I expected it to fail, but not that way! For some reason, your PHP believes that
"7.2.3" >= 7.3 -- that's not good!

If you upgrade your php you'll almost definitely resolve this problem. PHP 4.2.2 is pretty old and has known bugs. If you can't upgrade, I'd appreciate ssh access so that I can tinker with this directly to see if I can come up with a workaround...