G2 issues #1: URL re-write

robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Mon, 2005-04-18 22:44

Hi,

I've having a few problems with G2 so this is the first in a set of posts that will list them.

#1 URL re-write

URL re-write doesn't work, or at least, I can't configure it to work.

When I click "Configure" here's what I see:

 Configuring your Webserver

Before we configure your Gallery installation to use mod_rewrite, we test to make sure that it will work properly.
We are unable to properly test whether mod_rewrite is properly installed.



Manual Configuration

Gallery tries to test mod_rewrite in action. For this to work you need to edit each of these two files accordingly:

/home/apache/robinbowes.com/gallery/gallery2-CVS/modules/rewrite/test/mod_rewrite/custom/.htaccess
Line 6: RewriteBase /modules/rewrite/test/mod_rewrite/custom/

/home/apache/robinbowes.com/gallery/gallery2-CVS/modules/rewrite/test/mod_rewrite_no_options/custom/.htaccess
Line 6: RewriteBase /modules/rewrite/test/mod_rewrite_no_options/custom/

If the test still fails chanses are slim that this module will work. However, you may procede if you are confident that it will work. 

If I activate the module, it "doesn't work". Specically, my albums have links like this:

http://gallery.robinbowes.com//v/family/

...and they don't display.

Am I specifying the Gallery location correctly?

My installation is in /home/apache/robinbowes.com/gallery/live which is a symlink to /home/apache/robinbowes.com/gallery/gallery2-CVS.

This a virtual domain in apache accessed by http://gallery.robinbowes.com.

Any suggestions what I might be doing wrong?

R.
----

Gallery URL (optional): http://gallery.robinbowes.com
Gallery version: G2 Beta (from CVS) (How do I tell the version no.?)
Webserver (with version): apache 2.0.52
Datatabase (with version): 4.1.7
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional):
Graphics Toolkit(s): NetPBM
Operating system: Fedora Core 3
Web browser/version: Firefox
G1 version (for migration bugs):
[/code]

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-04-19 07:22

Bump.

Any suggestions as to where I should look for problems?

R.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-19 10:32

@bump:
bumping within the same day or two days of the initial post doesn't help very much. it makes it even harder for us to keep track of all requests.

there seems to be a slash '/' too much in your base address. maybe pelle can help you resolve the issue.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-04-19 12:22
valiant wrote:
@bump:
bumping within the same day or two days of the initial post doesn't help very much. it makes it even harder for us to keep track of all requests.

Sorry - it's just that I got replies to my other three posts pretty quickly.

Quote:
there seems to be a slash '/' too much in your base address. maybe pelle can help you resolve the issue.

OK. I'll hang tight...

R.

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Tue, 2005-04-19 14:32
robinbowes wrote:
Sorry - it's just that I got replies to my other three posts pretty quickly.

During weekdays I'm unfortionalty unable to check the forums more than maybe once a day.

Try uninstalling and installing the module again. Did you activate the module during install or later on?

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-04-19 14:59
pelle wrote:
robinbowes wrote:
Sorry - it's just that I got replies to my other three posts pretty quickly.

During weekdays I'm unfortionalty unable to check the forums more than maybe once a day.

Try uninstalling and installing the module again. Did you activate the module during install or later on?

Hi pelle,

I've tried uninstalling and re-installing the module.

As far as I recall, the module used to work but stopped at some stage so I disabled it and have not tried to get it working again until recently.

This isn't a "what's wrong" post - I would just like some idea of what settings to check, e.g. in my apache config, etc.

Cheers,

R.

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Tue, 2005-04-19 15:26

First off, did you try the "manual configuration"? Try getting the test to pass.

Second, you could try with (i'm not 100% sure its called pluginparameters, but something similar)
SELECT * FROM g2_pluginparameters WHERE pluginid = 'rewrite';

Check the value of galleryLocation.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-04-19 16:20
pelle wrote:
First off, did you try the "manual configuration"? Try getting the test to pass.

Yes. Couldn't get it to pass.

Quote:
Second, you could try with (i'm not 100% sure its called pluginparameters, but something similar)
SELECT * FROM g2_pluginparameters WHERE pluginid = 'rewrite';

Check the value of galleryLocation.

SELECT *
FROM `g2_PluginParameterMap`
WHERE g_pluginid = 'rewrite'
LIMIT 0 , 30

galleryLocation = "/"

R.

 
robinbowes

Joined: 2002-09-20
Posts: 99
Posted: Tue, 2005-04-19 16:25

More information:

(/home/apache/robinbowes.com/gallery/live is a symlink to /home/apache/robinbowes.com/gallery/gallery2-CVS)

/home/apache/robinbowes.com/gallery/live/.htaccess

# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteBase //

# Only redirect to Gallery base file if there's no such file already, and
# make sure gallery_remote2.php generates a 404 in order to be compatible
# with Gallery Remote.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !gallery\_remote2\.php
RewriteRule ^v/$ //main.php?g2_view=core:ShowItem [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !gallery\_remote2\.php
RewriteRule ^d/([0-9]+)-([0-9]+)/([^\/]+)$ //main.php?g2_view=core:DownloadItem&g2_itemId=$1&g2_serialNumber=$2 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !gallery\_remote2\.php
RewriteRule ^v/(.+)$ //main.php?g2_view=core:ShowItem&g2_path=$1 [QSA,L]

</IfModule>

# END Url Rewrite section

/home/apache/robinbowes.com/gallery/gallery2-CVS/modules/rewrite/test/mod_rewrite/custom/.htaccess

# Testing mod_rewrite full functionality
Options +FollowSymLinks
RewriteEngine On

# Uncomment and edit this line as appropriate to reflect your Gallery installation.
RewriteBase /modules/rewrite/test/mod_rewrite/custom/

RewriteRule Rewrite.txt Works.txt [L]

/home/apache/robinbowes.com/gallery/gallery2-CVS/modules/rewrite/test/mod_rewrite_no_options/custom/.htaccess

# Testing mod_rewrite full functionality
RewriteEngine On

# Uncomment and edit this line as appropriate to reflect your Gallery installation.
RewriteBase /modules/rewrite/test/mod_rewrite/custom/

RewriteRule Rewrite.txt Works.txt [L]