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
Posts: 7994
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...
Posts: 20
Does the debug output go somewhere besides on the page with the failure?
Posts: 8601
in the installer, no.
Posts: 20
In that case no more information was provided. It should be noted that my db is still completely empty.
Posts: 7994
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?
Posts: 20
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!
Posts: 2
(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
Posts: 2
Thanks to bharat on IRC I got a nightly build and everything works like a charm. I suggest you do the same.
Posts: 20
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.
Posts: 53
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
Posts: 8601
the error means missing hostname for the database.
did your config.php get written ok, with $storeConfig['hostname'] value?
Posts: 53
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.
Posts: 53
Issue "resolved" by creating new config.php and filling it out manually. Hmpf.
Posts: 20
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'] = '';
Posts: 20
Well I reconfigured Postgres to accept tcp/ip connections at localhost and it works now!
Posts: 6
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.
Posts: 7994
fcd, good call. I verified this with my own Postgres install .. we shouldn't be demanding a hostname there. I've removed that requirement.
Posts: 6
Shouldn't the topic be changed to be [SOLVED] then?