[SOLVED]Gallery2 refuses to install core on Postgres7.4.5 db

kayjay

Joined: 2005-02-26
Posts: 4
Posted: Sat, 2005-02-26 19:01

Gallery v2 refuses to install the core:

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)

debug:
Warning: pg_exec(): Query failed: ERROR: syntax error at or near
"." at character 132 in
/home/www/columbia/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(/home/www/columbia/gallery2/modules/core/classes/../../../)

----

Gallery URL (optional):
Gallery version: V2
Webserver (with version): Apache 1.3
Datatabase (with version): PostgresQL 7.4.5
PHP version (eg 4.2.1): 4.3.8
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system: Gnu/Linux Mandrake
Web browser/version: Firefox 1.0
[/b]

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-02-27 17:23

sounds like this is an upgrade, not a new install.
what core version are you upgrading from?

 
kayjay

Joined: 2005-02-26
Posts: 4
Posted: Sun, 2005-02-27 21:23

It's not an upgrade actually but a fresh install.
I even dropped the db and recreated a few times to make sure that not existing db objects could cause any issues.
so... empty/fresh/new db and new installation on a directory (gallery2) that has never been used

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-02-27 21:58

did you also empty the g2data directory before you ran the installer again?
and what G2 version is it? alpha 4, or a very recent nightly snapshot?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-02-27 22:34

ya, valiant is right.. make sure your g2data dir is empty.. it thinks you're upgrading, probably due to an old versions.dat in the g2data dir. also make sure you're using a recent nightly snapshot, not alpha-4.

 
kayjay

Joined: 2005-02-26
Posts: 4
Posted: Mon, 2005-02-28 18:44

This time I started overnew and it still doesnt install the core
I dropped and recreated the db as well as the g2data dir I recreated:
I also tried the nightly build but to be honest that one was even worse.
This time I will post the entire output:

Warning: join(): Bad arguments. in /home/www/columbia/gallery2/modules/core/classes/GalleryStorage/DatabaseStorage.class on line 1416

Error (ERROR_STORAGE_FAILURE) : Error trying to load /home/www/columbia/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/postgres/Schema.sql

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1243 (gallerystatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1025 (postgresqldatabasestorage::_executesqlfile)
* in modules/core/classes/GalleryStorage/DatabaseStorage/PostgreSqlDatabaseStorage.class at line 141 (databasestorage::configurestore)
* in modules/core/classes/GalleryStorage.class at line 338 (postgresqldatabasestorage::configurestore)
* in modules/core/classes/GalleryModule.class at line 163 (gallerystorage::configurestore)
* in install/steps/InstallCoreModuleStep.class at line 68 (coremodule::installorupgrade)
* in install/index.php at line 148 (installcoremodulestep::loadtemplatedata)

Debug Output:

file_exists(/home/www/columbia/gallery2/g2data/sessions/96f5117e597d77687ef39c441ed6314f)
file_exists(/home/www/columbia/gallery2/g2data/cache/module/core/0/0/0.inc)

(postgres7): set datestyle='ISO'

postgres7 error: [-1: ERROR: relation "g2_pluginparametermap" does not
exist] in EXECUTE("
SELECT
g2_PluginParameterMap.g_parameterName,
g2_PluginParameterMap.g_parameterValue
FROM
g2_PluginParameterMap
WHERE
g2_PluginParameterMap.g_pluginType = 'module'
AND
g2_PluginParameterMap.g_pluginId = 'core'
AND
g2_PluginParameterMap.g_itemId = 0
")

(postgres7):
SELECT
g2_PluginParameterMap.g_parameterName,
g2_PluginParameterMap.g_parameterValue
FROM
g2_PluginParameterMap
WHERE
g2_PluginParameterMap.g_pluginType = 'module'
AND
g2_PluginParameterMap.g_pluginId = 'core'
AND
g2_PluginParameterMap.g_itemId = 0

Warning: pg_exec(): Query failed: ERROR: relation
"g2_pluginparametermap" does not exist in
/home/www/columbia/gallery2/lib/adodb/drivers/adodb-postgres64.inc.php
on line 722

-1: ERROR: relation "g2_pluginparametermap" does not exist

adodb_postgres7._execute(
SELECT
g2_PluginParameter...) % line 818, file: adodb.inc.php

adodb_postgres7.execute(
SELECT
g2_PluginParameter..., Array[3]) % line 712, file: DatabaseStorage.class
postgresqldatabasestorage.search(
SELECT
[GalleryPluginPara..., Array[3], Array[0]) % line 220, file: GalleryStorage.class
gallerystorage.search(
SELECT
[GalleryPluginPara..., Array[3], Array[0]) % line 184, file: Gallery.class
gallery.search(
SELECT
[GalleryPluginPara..., Array[3]) % line 230, file: GalleryPluginHelper_simple.class

postgres7 error: [-1: ERROR: current transaction is aborted, commands
ignored until end of transaction block] in EXECUTE("select version()")

postgres7 error: [-1: ERROR: current transaction is aborted, commands
ignored until end of transaction block] in EXECUTE("select tablename,'T'
from pg_tables where tablename not like 'pg\_%'
and tablename not in ('sql_features', 'sql_implementation_info',
'sql_languages',
'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
union
select viewname,'V' from pg_views where viewname not like
'pg\_%'")

(postgres7): select version()

Warning: pg_exec(): Query failed: ERROR: current transaction is
aborted, commands ignored until end of transaction block in
/home/www/columbia/gallery2/lib/adodb/drivers/adodb-postgres64.inc.php
on line 722

-1: ERROR: current transaction is aborted, commands ignored until end of
transaction block

adodb_postgres7._execute(select version(),
false) % line 833, file: adodb.inc.php
adodb_postgres7.execute(select version(), false) % line 1241, file: adodb.inc.php
adodb_postgres7.getone(select version()) % line 126, file: adodb-postgres64.inc.php
adodb_postgres7.serverinfo() % line 204, file: adodb-postgres64.inc.php
adodb_postgres7.metatables() % line 1412, file: DatabaseStorage.class

(postgres7): select tablename, 'T' from pg_tables where tablename not like
'pg\_%'
and tablename not in ('sql_features', 'sql_implementation_info',
'sql_languages',
'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
union
select viewname, 'V' from pg_views where viewname not like 'pg\_%'

Warning: pg_exec(): Query failed: ERROR: current transaction is
aborted, commands ignored until end of transaction block in
/home/www/columbia/gallery2/lib/adodb/drivers/adodb-postgres64.inc.php
on line 722

-1: ERROR: current transaction is aborted, commands ignored until end of
transaction block

adodb_postgres7._execute(select tablename,'T'
from pg_tables where tablename not like 'pg..., false) % line 833, file: adodb.inc.php
adodb_postgres7.execute(select tablename,'T' from pg_tables
where tablename not like 'pg...) % line
1893, file: adodb.inc.php
adoconnection.metatables(false, false) % line 225, file: adodb-postgres64.inc.php
adodb_postgres7.metatables() % line 1412, file: DatabaseStorage.class
postgresqldatabasestorage.isinstalled() % line 491, file: GalleryStorage.class

file_exists(/home/www/columbia/gallery2/modules/core/classes/helpers/../../../../modules/core/module.inc)

(postgres7): set datestyle='ISO'

(postgres7):
CREATE AGGREGATE BIT_OR
(
basetype = bit,
sfunc = bitor,
stype = bit
)

file_exists(/home/www/columbia/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/postgres)
opendir(/home/www/columbia/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/postgres)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
readdir(Resource id #58)
closedir(Resource id #58)
postgres7 error: [-1: ERROR: current transaction is aborted, commands
ignored until end of transaction block] in EXECUTE("select tablename,'T'
from pg_tables where tablename not like 'pg\_%'
and tablename not in ('sql_features', 'sql_implementation_info',
'sql_languages',
'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
union
select viewname,'V' from pg_views where viewname not like
'pg\_%'")

(postgres7): select tablename, 'T' from pg_tables where tablename not like
'pg\_%'
and tablename not in ('sql_features', 'sql_implementation_info',
'sql_languages',
'sql_packages', 'sql_sizing', 'sql_sizing_profiles')
union
select viewname, 'V' from pg_views where viewname not like 'pg\_%'

Warning: pg_exec(): Query failed: ERROR: current transaction is
aborted, commands ignored until end of transaction block in
/home/www/columbia/gallery2/lib/adodb/drivers/adodb-postgres64.inc.php
on line 722

-1: ERROR: current transaction is aborted, commands ignored until end of
transaction block

adodb_postgres7._execute(select
tablename,'T' from pg_tables where tablename not like 'pg...,
false) % line 833, file: adodb.inc.php
adodb_postgres7.execute(select tablename,'T' from pg_tables
where tablename not like 'pg...) % line
1893, file: adodb.inc.php
adoconnection.metatables(false, false) % line 225, file: adodb-postgres64.inc.php
adodb_postgres7.metatables() % line 1009, file: DatabaseStorage.class
databasestorage.configurestore(core) % line 141, file: PostgreSqlDatabaseStorage.class

fopen(/home/www/columbia/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/postgres/Schema.sql,
r, 0)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
fgets(Resource id #61, 4096)
feof(Resource id #61)
postgres7 error: [-1: ERROR: current transaction is aborted, commands
ignored until end of transaction block] in EXECUTE("-- This file was
automatically generated from an XSL template, which is
-- why it looks so ugly. Editing it by hand would be a bad idea.
--

CREATE TABLE g2_Schema (
g_name
VARCHAR(

128

)

NOT NULL

,
g_major
INTEGER

NOT NULL

,
g_minor
INTEGER

NOT NULL

)")

(postgres7): -- This file was automatically generated from an XSL
template, which is
-- why it looks so ugly. Editing it by hand would be a bad idea.
--

CREATE TABLE g2_Schema (
g_name
VARCHAR(

128

)

NOT NULL

,
g_major
INTEGER

NOT NULL

,
g_minor
INTEGER

NOT NULL

)

Warning: pg_exec(): Query failed: ERROR: current transaction is
aborted, commands ignored until end of transaction block in
/home/www/columbia/gallery2/lib/adodb/drivers/adodb-postgres64.inc.php
on line 722

-1: ERROR: current transaction is aborted, commands ignored until end of
transaction block

adodb_postgres7._execute(-- This file was
automatically generated from an XSL template, w..., false) % line 833, file: adodb.inc.php
adodb_postgres7.execute(-- This file was automatically
generated from an XSL template, w...) %
line 1239, file: DatabaseStorage.class
postgresqldatabasestorage._executesqlfile(/home/www/columbia/gallery2/modules/core/classes/GalleryStorage/...) % line 1025, file: DatabaseStorage.class
databasestorage.configurestore(core) % line 141, file: PostgreSqlDatabaseStorage.class
postgresqldatabasestorage.configurestore(core) % line 338, file: GalleryStorage.class

realpath(/home/www/columbia/gallery2/modules/core/classes/../../../)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-02-28 20:07

several tables that G2 should have installed during the install steps don't exist in your database.
i installed G2/postgres 7.4 yesterday with the current cvs version and everything worked fine.
could you start the installer (don't finish it) to check how many missing files there are in your G2 version and post the list of the missing files?
i'd start again, something went wrong. either when you uploaded the G2 application to the server (ftp??) or because some old db/cached files interfered.

 
kayjay

Joined: 2005-02-26
Posts: 4
Posted: Mon, 2005-02-28 20:33

I installed it thistime in a new db (gallery) and i didnt use tha latest CVS this time but one version older and it worked.
Perhaps it was the Postgresql cache.