Member
Member
edasque   2007-03-02, 16:50
#1

Hi all,

http://www.generalmagic.org has been running for a while (with sub-albums now) but it's the first time I tackle the issue of mod_rewrite/.htaccess.

I have turned on mod_rewrite in the zp-config.php file and modified my .htaccess (in /var/www/gallery with:

RewriteBase /gallery

I have switched to the testing theme to eliminate any issue that might be theme related.

http://www.generalmagic.org/gallery/ works but clicking on any album doesn't.

Where should I look first ?

Member
Member
thinkdreams   2007-03-02, 16:58
#2

@edasque-

What version are you running. If not 1.8.0.2, then you should upgrade. Modrewrite and subalbums didn't work "perfectly" before version 1.0.7.

If you are on 1.8.0.2, then let us know, and we can help you further from there.

Member
Member
edasque   2007-03-02, 17:00
#3

I am running 1.0.8. If I need to move to 1.0.8.2 I will, let me know.

Member
Member
thinkdreams   2007-03-02, 17:11
#4

Nope, 1.0.8 should work. Hmmm. How about upgrading to 1.0.8.2 and see what happens. Tristan included some fixes in there that may be what you are experiencing. Should be just a file replacement in the /zen directory for your current files.

Try that, and let us know.

Member
Member
edasque   2007-03-02, 17:27
#5

So I updated to 1.0.8.2:

cp index.php /var/www/gallery
cp -r zen/* /var/www/gallery/zen

Note that the version on the admin tool still says 1.0.8, I am not sure that's right.

The problem remains. Don't know if it's subalbums related as clicking on a main album results in the error.

http://www.generalmagic.org/gallery/ -> works
http://www.generalmagic.org/gallery/page/2/ -> does not work
http://www.generalmagic.org/gallery/Portfolio%202005/ -> has a space, doesn't work
http://www.generalmagic.org/gallery/Others -> no space, dooesn't work
http://www.generalmagic.org/gallery/Underwater/KeyLargo2006/Reef/2006-11-03_CRW_2984.jpg.php --> image in sub album, doesn't work but .php does show up now.

http://www.generalmagic.org/gallery/zen/admin.php works by the way.

So it might not be related to sub-albums and spacing. I am betting on user error in mod_rewrite/.htaccess/zenphoto configuration.

Any idea ?

Member
Member
edasque   2007-03-02, 18:07
#6

for reference, this is my .htaccess:

htaccess file for zenphoto


NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.


RewriteEngine On

!!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!!


RewriteBase /gallery


RewriteRule ^admin/?$ zen/admin.php [R,L]

RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^.*$ - [R,L]

RewriteRule index.php$ index.php [L,QSA]
RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
RewriteRule ^page/([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L,QSA]
RewriteRule ^(.)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
RewriteRule ^(.
)/image/(thumb|[0-9]{1,4})/([^/\]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA]
RewriteRule ^(.*)/image/([^/\]+)$ zen/i.php?a=$1&i=$2 [L,QSA]

Catch-all - everything else gets handled in PHP for compatibility.


RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA]

Member
Member
edasque   2007-03-02, 18:16
#7

Could mod_rewrite not be on in my config. Is there a way to turn it on at the apache level ?

Member
Member
thinkdreams   2007-03-02, 18:38
#8

mod_rewrite, if it's on in zp_config (set to true), then is on for zenphoto. I can't imagine your host doesn't support it.

And the admin will say 1.0.8, since the functions.php variable for version # is 1.0.8. I changed mine manually, but that's just a cosmetic thing I do to keep track of what version I'm using.

Member
Member
edasque   2007-03-02, 18:41
#9

so any idea ?

I noticed that an old URL such as:

http://www.generalmagic.org/gallery/index.php?album=Portfolio+2007%2FRassain

does get rewritten as (what I imagine is correctly) :

http://www.generalmagic.org/gallery/Portfolio%202007/Rassain

Which would seem to indicate that my config doesn't seem to be able to deal with that path ?

Member
Member
thinkdreams   2007-03-02, 19:08
#10

I don't have any ideas on this one. Most of what you're explaining behavior-wise should be fixed with 1.0.8.2.

Any thoughts Tristan?

Member
Member
edasque   2007-03-02, 20:04
#11

I decided to do a full install (instead of upgrade after upgrade since 1.0) of zenphoto 1.0.8.2 just using my existing zp-config.php, database and albums directory. Since I nixed the cache, the thumbnails don't appear anymore and I still have the URL issue.

Member
Member
thinkdreams   2007-03-02, 20:25
#12

Did you update the zp_config to the current one in the 1.0.8.2 distribution, or are you still using the older version, as there have been some changes in that file recently.

Member
Member
edasque   2007-03-02, 20:57
#13

I had. I just rebuilt it from scratch and ended up with the same issue.

Developer
Developer
trisweb   2007-03-02, 21:05
#14

It's as simple as mod_rewrite not being enabled on your host. Give us a `` to verify, but I'll bet you that's it.

That should be your first clue when none of the paths work ;-)

Also, your cache directory is not writable, but that's an entirely different problem :-)

http://www.generalmagic.org/gallery/zen/i.php?a=Portfolio%202007/Rassain&i=IMG_7493_4_5.jpg&s=thumb

Member
Member
edasque   2007-03-02, 21:14
#15

Ok, the cache thing happened when I reinstalled an hour ago. Sorry about that. Should be fixed.

Here's a phpinfo: http://www.generalmagic.org/phpinfo.php

Member
Member
edasque   2007-03-02, 21:20
#16

Ok, I have enabled mod_rewrite by moving the rewrite.load file to mods-enabled and it seems mod-rewrite is now enabled from the phpinfo.php file but the problem remains ?

Developer
Developer
trisweb   2007-03-02, 21:38
#17

Seems like it's still not getting the mod_rewrite enabled.

You have your own server (or VPS) (Debian too, nice) so you'll probably need to add

AllowOverride all

in your directory configuration block to enable the use of .htaccess files to override the httpd conf. :-) Ex:

`

    AllowOverride All

    Order allow,deny

    Allow from all

    Options Indexes FollowSymLinks

`

Member
Member
edasque   2007-03-02, 21:50
#18

Awesome. That worked. So to sum it up I didn't have mod_rewrite enabled and didn't have it configured to allow overrides in my virtual host configuration.

Thanks a bunch, you two !

Developer
Developer
trisweb   2007-03-02, 22:07
#19

You're welcome!

Yeah, I had the same problem setting up my server. You have to configure a lot of things manually that you take for granted on shared hosting

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.