Installed successfully (multisite) but keep getting install page when I try to login

msalt

Joined: 2010-08-04
Posts: 8
Posted: Sun, 2010-08-22 21:01


Gallery version (not just "2"): 2.3.1
PHP version (e.g. 5.1.6): 5.2.11
PHPInfo Link (see FAQ): withheld for security reasons
Webserver (e.g. Apache 1.3.33): Apache 2.2.13
Database (e.g. MySql 5.0.32): MySql 5.0.91
Activated toolkits (e.g. NetPbm, GD): ImageMagic
Operating system (e.g. Linux): Linux
Browser (e.g. Firefox 2.0): Firefox 3.6.7

I'm upgrading from Gallery 1.5.1 but am not able to finish the step of installing 2.3.1.
I have completed the install, and it says everything is OK. But when I go to the directory,
or directly to the main.php page or index.php page, it puts me back into the install page.

This is a multisite install. I renamed the Gallery 1.5.1 folder from /gallery/ to /g1/, and it continues to work fine
once I updated the folder changes. The new Gallery install is in a new folder named /gallery/. The Multisite directory
is the web document root directory. Config.php reflects all of this correctly.

The problem appears to be with lines 28-35 of main.php in /gallery/, which read as follows:
/*
* If they don't have a setup password, we assume that the config.php is empty and this is an
* initial install
*/
if (!@$gallery->getConfig('setup.password')) {
/* May be invalid if a multisite install lost its config.php; galleryBaseUrl unknown */
header('Location: install/');
return;
}

That seems like what may have happened -- the multisite install lost its config.php -- so how can I get the multisite install to "find" its config.php? I see it, right where it is supposed to be, and we do have a setup password. File permissions are set to 400, as recommended in the Gallery 2 Security document for PHP that runs under your user.

Can anyone please help me figure out how to correct this? Thanks!

 
scaturan
scaturan's picture

Joined: 2004-09-12
Posts: 1153
Posted: Wed, 2010-11-03 17:09

let's break this down a bit:

Gallery 2.3.1 codebase - /path/to/html/gallery/
Gallery 1.5 - /path/to/html/g1/
Multisite - /path/to/html/

is that correct?

this is what I would do to try and recreate the config.php for your multisite:
run the installer, create a temporary multisite location with its own database/g2data folders, once that's setup, make a copy of config.php, edit the file and fill out the variables for "g2data" and database stuff, then save it on /path/to/html/ - run the installer again for that broken multisite and make sure to "reuse" the existing ~/g2data/ and database.

__________________________________________________________
liberate your photos with Gallery, make the switch today!
http://pixi.me/