[SOLVED] all my url's get itemid= instead of actual file names

btblue

Joined: 2006-01-07
Posts: 64
Posted: Thu, 2013-03-07 07:52

I hope somebody can help me. I obviously did something but don't know what. Long story short, all my url's have itemid= instead of actual file names. They are all unique. I'm guessing it has something to do with url rewrite but don't know how to fix it. This is what I get when I try to configure it:

URL Rewrite Setup
Apache mod_rewrite

The Apache mod_rewrite module is installed on most Apache servers by default. If you are unsure of what method you should choose then select this. Gallery will try to detect if your server supports mod_rewrite.
PHP Path Info

Using Path Info is supported by most systems. With this method Gallery parses the URL itself during the request.

It is recomended that you don't activate the 'Download Item' URL since it will slow down Gallery.
Block hotlinking is not supported.

Up until 2 days ago everything was working properly. I hope this is enough information to solve the problem.

Gallery URL = http://lloydspitalnikphotos.com/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.13 cgi-fcgi
Webserver = Apache
Database = mysqli 5.5.24-percona-sure1-log, lock.system=flock
Toolkits = Getid3, Thumbnail, NetPBM, Exif, ImageMagick
Acceleration = none, none
Operating system = Linux s435.sureserver.com 2.6.32.49-grsec #1 SMP Wed Nov 30 10:01:38 EST 2011 x86_64
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11
Rows in GalleryAccessMap table = 16
Rows in GalleryAccessSubscriberMap table = 6120
Rows in GalleryUser table = 2
Rows in GalleryItem table = 6118
Rows in GalleryAlbumItem table = 301
Rows in GalleryCacheMap table = 0

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-03-07 17:45

Quoting to us the options the module gives you does not help which option did you pick? and what were the results?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
btblue

Joined: 2006-01-07
Posts: 64
Posted: Thu, 2013-03-07 19:54

Thanks suprsidr. I set this up in 2008 and haven't had to deal with it. I don't remember any of this any more but I think it's in .htaccess. If I'm right I have no idea how to direct it to show actual file names in the url instead of itemid. Here is my .htaccess. I really hope you can help.
Thanks,
Lloyd www.lloydspitalnikphotos.com/main.php

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

RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . - [L]

RewriteCond %{HTTP:Authorization} (.+)
RewriteCond %{QUERY_STRING} !g2_authorization=
RewriteRule . %{REQUEST_URI}?g2_authorization=%1 [QSA]
RewriteCond %{THE_REQUEST} /d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/main\.php$
RewriteRule . /main.php?g2_path=%1 [QSA,L]
</IfModule>

# END Url Rewrite section
RedirectMatch "^/blog/?$" "http://blog.lloydspitalnikphotos.com"

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-03-07 20:02

The rewrite module will write the rules to .htaccess for you when it is activated.
BUT
You're going to need to update to 2.3.2
Your server is running php5.3.x
G2 2.3.1 was released to support php 5.3.x
FAQ: How to upgrade Gallery2?

you'll want to re-add RedirectMatch "^/blog/?$" "http://blog.lloydspitalnikphotos.com" to your .htaccess after gallery's rewrite has been re-activated.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
btblue

Joined: 2006-01-07
Posts: 64
Posted: Thu, 2013-03-07 23:08

Thanks again for your help. I'm installing 2.3.2 and am hung up at step 8. I get this message: Warning: rmdir(/home/lloyd/www/www/g2data//cache/entity/) [function.rmdir]: Directory not empty in /home/lloyd/www/www/modules/core/classes/GalleryPlatform.class on line 516. I know I should know more than I do but I'm at at a total loss. Sorry to keep bothering you.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-03-07 23:15

go ahead and manually remove /home/lloyd/www/www/g2data//cache/entity/

also make sure the path is correct in gallery2/config.php line ~66
$gallery->setConfig('data.gallery.base', '/path/to/your/g2data/'); - with a single trailing slash(/)

-s
________________________________
All New jQuery Minislideshow for G2/G3