Unable to communicate with the database - what should i do

solarisb

Joined: 2005-12-13
Posts: 4
Posted: Tue, 2005-12-13 16:56

I have a real troubles - so i`ll be more than happy if anyone spare me 5 min.
I can`t install the G2 core - this is the err msg

Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 253 (gallerystatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 210 (mysqldatabasestorage::_getconnection)
* in modules/core/classes/GalleryStorage.class at line 728 (mysqldatabasestorage::init)
* in install/steps/InstallCoreModuleStep.class at line 89 (gallerystorage::isinstalled)
* in install/index.php at line 167 (installcoremodulestep::loadtemplatedata)

This is my installation log - i`ll be glad if anyone could help me...

http://gallery.itcreations.biz/installlog.txt

10x

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-12-13 20:42

please delete g2data/ and drop the database and try to install again.

 
solarisb

Joined: 2005-12-13
Posts: 4
Posted: Tue, 2005-12-13 21:16

It`s the 3th time i`m doing it - nothing - same story....if someone can tell me how to fix this thing..or at least where exactly is the problem...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-12-14 00:03

please post a phpinfo link. i guess mysql_pconnect / mysql_nconnect are not available / disabled.

 
solarisb

Joined: 2005-12-13
Posts: 4
Posted: Wed, 2005-12-14 07:52

10x valiant - you`r saving the day now
here is the info - http://gallery.itcreations.biz/phpinfo.php

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-12-14 13:06

hmm, ok, not what i thought.

you'll have to find out yourself.
in modules/core/classes/GalleryStorage/DatabaseStorage.class function _getConnection, you'll have to debug to find out why it fails.

	if ($forceNew || !$this->_usePersistentConnections) {
	    $connectMethod = 'NConnect';
	} else {
	    $connectMethod = 'PConnect';
	}

replace if ($forceNew || !$this->_usePersistentConnections) { one time with
if (true) {
and if that doesn't help (delete g2data, drop database, try to install again)
replace it with
if (false) {
and try again.

(alternatively, you can also just change the persitentConnections option in config.php in each installation try after writing config.php but before advancing to step 8. then you wouldn't have to edit the DatabaseStorage.class file)
if you are webhosted, maybe ask your webhost if they know why mysql_pconnect might fail.

 
solarisb

Joined: 2005-12-13
Posts: 4
Posted: Wed, 2005-12-14 18:18

10x a lot - i`ll try both ways.