incorrect url to admin page

I installed Zenphoto localhost. I can make most of it work, but some of the urls are wrong. The most obvious example is the admin link from the home page.
The home page is at http://localhost/zen/
The admin link at the bottom of the page resolves to http://localhost/zen/admin/ , to reach the admin page manually the url is http://localhost/zen/zen/admin.php, from there most things seem to operate well.

Comments

  • A little extra info:
    mod_rewrite is set to false.
  • Quick fix here is in:
    /template-functions.php line 184

    - printLink(WEBPATH.'/admin/', $text, $title, $class, $id);

    + printLink(WEBPATH.'/zenphoto/admin.php', $text, $title, $class, $id);

    But if your not using mod_rewrite more needs to happen.
    The bug has been reported.
  • trisweb Administrator
    Yep, that is true. Thanks for the bug report. Lots of problems without mod_rewrite at the moment.
  • Can't get .htaccess to work for my life. 500 server errors. I'm trying to install in the root directory. RewriteBase should not need a value.
    Do you have a breakdown of what permissions for directories should be.

    current .htaccess looks like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On

    # !!! Change this to the absolute path !!!
    # RewriteBase

    RewriteRule ^zen/(.*)$ - [L]
    RewriteRule ^tests/(.*)$ - [L]
    RewriteRule ^admin$ admin/ [R]
    RewriteRule ^admin/?$ zen/admin.php [QSA,L]
    RewriteRule ^admin/admin.css$ zen/admin.css [R,L]
    RewriteRule ^admin/admin.js$ zen/admin.js [R,L]

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

    </IfModule>
  • trisweb Administrator
    You gotta have that RewriteBase set to the path from the root of your server.

    Also, mod_rewrite *only* works with Apache. Looks like you've got IIS on localhost, so no dice. I'll get a bugfix out which fixes bugs when mod_rewrite is off.
  • Nope, using Apache - server errors had to do with the way I'm using my Mac to handle .htaccess files, haven't quite figured out what yet. In any case, i have a site up and running at

    http://codevillain.com

    RewriteBase /

    works in .htaccess

    And it looks like fun so far, Thanks
  • Went poking around after upload my first photo and creating my first gallery. Only made one attempt at the upload and everything seemed to work fine.
    The database image table looked like this , the extra rows are persistent as you upload more images, and the admin page returns 4 photos in the gallery when there is only one.
  • trisweb Administrator
    Don't worry about that :) They're just extraneous entries for some weird reason. Feel free to delete them.
  • If you don't want to use mod_rewrite, you will have to :

    1- like already says :
    /template-functions.php line 184

    - printLink(WEBPATH.'/admin/', $text, $title, $class, $id);

    + printLink(WEBPATH.'/zenphoto/admin.php', $text, $title, $class, $id);

    2- Search and replace all :
    /admin/?
    by /zen/admin.php?
    in zen/admin.php
  • trisweb Administrator
    Shoot I still didn't fix those?? Next release and soon. Sorry about that.
Sign In or Register to comment.