Not sure how to update paths in config.php to get G1 working again after changing folder structure

stefanaalten
stefanaalten's picture

Joined: 2004-08-23
Posts: 67
Posted: Sat, 2009-10-31 13:53

Trying to get my old G1 installation back up & running - I have installed G2 & that's working but need to check back to my G1 for a couple of things. Thing is, I had to rename the top level folder G1 is in & that made G1 inaccessible from web, although it is working fine for import purposes (ie. from G2 I can successfully import albums from G1, so I know my G1 is ok).

I've got myself all muddled up with the paths - not sure what they should be for the new folder structure.

Folder structure before installing G2:

/gallery
../public
../../(gallery 1 folders, e.g. albums, classes, contrib, etc.)

Folder structure after installing G2:

/gallery
../public
../../g1
../../../(gallery 1 folders, e.g. albums, classes, contrib, etc.)
../../gallery2
../../../(gallery2 folders, e.g. g2data, images, install, etc.)

This is what's currently in my G1 config.php - but I know that's wrong:

$gallery->app->albumDir = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/albums";
$gallery->app->tmpDir = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/temp";
$gallery->app->photoAlbumURL = "http://www.gallery.aaltenvoogd.com";
$gallery->app->albumDirURL = "http://www.gallery.aaltenvoogd.com/albums";
$gallery->app->movieThumbnail = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/movie.thumb.jpg";

and a bit further down:

$gallery->app->userDir = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/albums/.users";

Those were the only lines I could find with references to URL's.

How should I change the above to reflect the new folder structure, i.e. where should I insert references to "g1" to get it working again (alongside my working G2).

Sorry - I know it's a simple question but I've got myself pretty confused & would value some help!

Many thanks.

Info below for my G1 installation:

The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): used to be "gallery.aaltenvoogd.com" but now? gallery.aaltenvoogd.com/g1?
(Gallery 2 URL is gallery.aaltenvoogd.com/gallery2)
Gallery version: 1.5.10
Apache version: sorry, don't know
PHP version (don't just say PHP 4, please): 5.2.9 I think
Graphics Toolkit: Netpbm
Operating system: Linux
Web browser/version (if applicable): Firefox, Chrome, IE8, Safari (on iPhone)

 
stefanaalten
stefanaalten's picture

Joined: 2004-08-23
Posts: 67
Posted: Sat, 2009-10-31 14:16

I made this change to the above, inserting "g1" where I *think* it should go and that gave me partially working G1 - but when I try to view an album I get the following error:

"Not Found
The requested URL /view_album.php was not found on this server."

Likewise when I try to create a new album I get this error - although mysteriously it does result in a new album being created? And I am able to delete the newly created album ... all very perplexing.

Updated lines in my G1 config.php:

$gallery->app->albumDir = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/g1/albums";
$gallery->app->tmpDir = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/g1/temp";
$gallery->app->photoAlbumURL = "http://www.gallery.aaltenvoogd.com/g1";
$gallery->app->albumDirURL = "http://www.gallery.aaltenvoogd.com/g1/albums";
$gallery->app->movieThumbnail = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/g1/movie.thumb.jpg";

and further down:

$gallery->app->userDir = "/services/webpages/a/a/aaltenvoogd.com/gallery/public/g1/albums/.users";

Many thanks in advance for any help!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-02 18:37

I don't understand what you are trying to do? Are you trying to migrate to G2? Are you trying to have a working G1 and G2 install?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
stefanaalten
stefanaalten's picture

Joined: 2004-08-23
Posts: 67
Posted: Mon, 2009-11-02 20:43

I just want to check the contents of my old G1 and my new G2 side by side, before I finally ditch the G1. I have already installed G2 successfully and I *think* I have imported all G1 albums, so this is just as a final check. It's just weird that G1 *seems* to work but as soon as I try to access an album I get "Not Found. The requested URL /view_album.php was not found on this server."

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-02 20:46

Ah, You might need to change some of the rewrite rules for G1. Take a look at your .htaccess and see if there is anything in there referring to the old location/path.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
stefanaalten
stefanaalten's picture

Joined: 2004-08-23
Posts: 67
Posted: Mon, 2009-11-02 21:08

Thanks - I've copied contents of the .htaccess file in /gallery/public/g1 below but I'm afraid I don't really know what it all means - can you help please?

Thanks,
Stefan

# BEGIN Gallery section
# (Automatically generated. Do not edit this section)
# Note: still under development, so format may change.
# If you edit this file, make a backup before runnng the Config. Wizard.

Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/$ /$1 [R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)$ /view_album.php?set_albumName=$1 [QSA]
</IfModule>
# END Gallery section. Add User changes below this line

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-02 21:12

Try changing:
RewriteBase /

to
RewriteBase /g1/
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
stefanaalten
stefanaalten's picture

Joined: 2004-08-23
Posts: 67
Posted: Mon, 2009-11-02 21:22

Thanks for really prompt reply - sadly, no change ... also tried it with "RewriteBase /gallery/public/g1/" but no luck either ... ? Hoping you might have another idea?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-02 22:02

I'd try running through the setup for G1 and making sure everything is working properly. And try turning off URL Rewrite all together.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here