[SOLVED] G2 install fails at step 7 on postgres

fcd

Joined: 2002-09-25
Posts: 20
Posted: Sat, 2005-01-15 20:05

Heres the error:
Unable to communicate with the database

Stack Trace:

Error (ERROR_MISSING_VALUE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 220 (gallerystatus::error)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 196 (postgresqldatabasestorage::_getconnection)
in modules/core/classes/GalleryStorage.class at line 483 (postgresqldatabasestorage::init)
in install/steps/InstallCoreModuleStep.class at line 67 (gallerystorage::isinstalled)
in install/index.php at line 160 (installcoremodulestep::loadtemplatedata)

Debug Output:

file_exists(/web/g2data//cache/entity)
file_exists(/web/g2data//cache/layout)
file_exists(/web/g2data//cache/module)
file_exists(/web/g2data//cache/derivative)
realpath(/web/xaraya/gallery2/modules/core/classes/../../../)

----

Gallery URL (optional):
Gallery version:cvs 15-Jan-05
Webserver (with version):apache 1.3.33
Datatabase (with version):PostgreSQL 7.3.5
PHP version (eg 4.2.1):4.3.5
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:FreeBSD
Web browser/version:Safari 1.2.4

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-01-15 21:48

Is that all the debug output? There should have been a lot more, including the SQL that caused it to fail.

I just installed from scratch on Postgres 7.4.6 and it worked ok for me so I'll be interested to see what SQL is failing for you...

 
fcd

Joined: 2002-09-25
Posts: 20
Posted: Sun, 2005-01-16 02:29

Does the debug output go somewhere besides on the page with the failure?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-01-16 03:00

in the installer, no.

 
fcd

Joined: 2002-09-25
Posts: 20
Posted: Sun, 2005-01-16 16:26

In that case no more information was provided. It should be noted that my db is still completely empty.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-18 04:10

That's surprising. When the install fails for me, it gives *tons* of output. Would you try again from scratch, please and verify that it doesn't give more output?

 
fcd

Joined: 2002-09-25
Posts: 20
Posted: Wed, 2005-01-19 00:59

ok...installed from scratch...same error...no more output.

A few comments. Xaraya has also been giving me weird error messages seeming to have nothing to do with actual errors.

I upgraded to the latest php4. See http://216.235.149.51/phpinfo.php

I also cleaned out the installation (including removing the data directory) and somehow the installer knew my settings and gave the same error...even though the data directory didn't exist!

 
Guills

Joined: 2005-01-19
Posts: 2
Posted: Wed, 2005-01-19 04:22

(entire debug message attached)

Basically, I get this:

Stack Trace:
Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 741 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 241 (postgresqldatabasestorage::execute)
* in modules/core/CoreModuleExtras.inc at line 201 (gallerystorage::execute)
* in modules/core/module.inc at line 663 (coremoduleextras::upgrade)
* in modules/core/classes/GalleryModule.class at line 168 (coremodule::upgrade)
* in install/steps/InstallCoreModuleStep.class at line 68 (coremodule::installorupgrade)
* in install/index.php at line 148 (installcoremodulestep::loadtemplatedata)

Then

Debug Output:

file_exists(/var/g2data/sessions/18273071c45cddfb1e573565eedbb19b)

(postgres7): set datestyle='ISO'

(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')
[... it all looks fine here ... it ends with this error:]

Warning: pg_exec(): Query failed: ERROR: syntax error at or near
"." at character 132 in
/var/www/localhost/htdocs/gallery2/lib/adodb/drivers/adodb-postgres64.inc.php
on line 722

-1: ERROR: syntax error at or near "." at character 132

adodb_postgres7._execute(
UPDATE
g2_PluginParameter...) % line 818, file: adodb.inc.php
adodb_postgres7.execute(
UPDATE
g2_PluginParameter..., Array[2]) % line 735, file: DatabaseStorage.class
postgresqldatabasestorage.execute(
UPDATE
[GalleryPluginPara..., Array[2]) % line 241, file: GalleryStorage.class
gallerystorage.execute(
UPDATE
[GalleryPluginPara..., Array[2]) % line 201, file: CoreModuleExtras.inc
coremoduleextras.upgrade(Object:coremodule, null) % line 663, file: module.inc

realpath(/var/www/localhost/htdocs/gallery2/modules/core/classes/../../../)

Hope that helps. I've tried a couple times with empty directories / databases.

Guills

 
Guills

Joined: 2005-01-19
Posts: 2
Posted: Wed, 2005-01-19 05:20

Thanks to bharat on IRC I got a nightly build and everything works like a charm. I suggest you do the same. :)

 
fcd

Joined: 2002-09-25
Posts: 20
Posted: Thu, 2005-01-20 03:14

Well now I've updated to the latest cvs. I've also updated my server and am running Apache 2, php 5 and postgres 7.4.1. Still same errors :-( I wonder if FreeBSD seems to have anything to do with it.

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Thu, 2005-01-20 20:21

Latest CVS (checked out 10 minutes ago) is giving me the exact same errors:

Error (ERROR_MISSING_VALUE)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 220 (gallerystatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 196 (mysqldatabasestorage::_getconnection)
* in modules/core/classes/GalleryStorage.class at line 483 (mysqldatabasestorage::init)
* in install/steps/InstallCoreModuleStep.class at line 67 (gallerystorage::isinstalled)
* in install/index.php at line 160 (installcoremodulestep::loadtemplatedata)

Debug Output:

file_exists(//cache/entity)
file_exists(//cache/layout)
file_exists(//cache/module)
file_exists(//cache/derivative)
realpath(/home/hostom/public_html/gallery2/modules/core/classes/../../../)

with MySQL (I have 4.0.23 installed, but tried all settings in the installer), PHP 4.3.10 and apache 1.3.3

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-01-20 21:05

the error means missing hostname for the database.
did your config.php get written ok, with $storeConfig['hostname'] value?

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Thu, 2005-01-20 21:59

That is most strange, config.php doesn't seem to have any data *at all*.

I have created it (touch config.php), chmodded it 666 (and even tried 777) but nothing gets written, even when G2 says "config.php created successfully".

I really don't know what to think.

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Thu, 2005-01-20 22:06

Issue "resolved" by creating new config.php and filling it out manually. Hmpf.

 
fcd

Joined: 2002-09-25
Posts: 20
Posted: Thu, 2005-01-20 23:46

Hmmm...my postgres setup only accepts unix socket connection (the default setup) which is generally designated by an empty hostname. So for me an empty hostname is valid. I have $storeConfig['hostname'] = '';

 
fcd

Joined: 2002-09-25
Posts: 20
Posted: Sun, 2005-01-30 16:27

Well I reconfigured Postgres to accept tcp/ip connections at localhost and it works now!

 
pwagland

Joined: 2005-03-06
Posts: 6
Posted: Sun, 2005-03-06 22:07
fcd wrote:
Hmmm...my postgres setup only accepts unix socket connection (the default setup) which is generally designated by an empty hostname. So for me an empty hostname is valid. I have $storeConfig['hostname'] = '';

I have the exact same problem... I got around it by commenting out lines 227-229. They are only checking for an invalid condition which, in my case, is actually valid. Hope this helps.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-03-07 04:27

fcd, good call. I verified this with my own Postgres install .. we shouldn't be demanding a hostname there. I've removed that requirement.

 
pwagland

Joined: 2005-03-06
Posts: 6
Posted: Mon, 2005-03-07 21:48
bharat wrote:
fcd, good call. I verified this with my own Postgres install .. we shouldn't be demanding a hostname there. I've removed that requirement.

Shouldn't the topic be changed to be [SOLVED] then?