Upgrading to 1.0.0 - path errors - Help!!

Upgraded to 1.0b from 0.9b but the all the images and css style files are not loaded. What I'm getting is a barebone html file with text and empty image placeholders. The respective albums show up on the page, but without images and styling.

All links are broken e.g link to album is shown as
`http://index.php/?album=2005-12-06``

Same goes for all links (portion of source of loaded webpage)

``



2005-12-06


`

Edited config.php as instructed, not using mod_rewrite. Admin page loads fine. Images in admin pages load fine.

Help!!!~~
«1

Comments

  • peh Member
    For what it's worth... I have same problem.
  • I have the same problem... I do not know what the ultimate fix would be, but I did the following to get it to work for now.

    in config.php I changed
    $conf['mod_rewrite'] = true;
    to
    $conf['mod_rewrite'] = false;

    I also added the following:
    define('SERVERPATH', '[full path]/zenphoto');
    define('WEBPATH', '/zenphoto');
    define('SERVERCACHE', SERVERPATH . "/cache");
    define('WEBCACHE', WEBPATH . "/cache");

    and then in in my zenphoto directory, I renamed the .htaccess so that it no longer works.

    now it at least works.

    http://legobuff.com/zenphoto/

    -Jamie
  • I to ran into the same problem. I did what legobuff did and this worked for me.

    http://beta.chilifrei.net/zenphoto1

    Just a few things...
    when logged in as admin and viewing the gallery.. you get script errors in IE.. not in firefox..

    Really everything else works great.. My first install with .9 on IIS was troublesome.... this install was quick and clean.. the problem listed above was the only problem and it was easily fixed.. so far everything else works

    Great job!!!
  • Yep,

    Ran into the same exact problem, but did what legobuff said above and it works great!
  • I'm having the same problem, and already changed mod_rewrite to false.

    But where exactly do I put in this?

    define('SERVERPATH', '[full path]/zenphoto');
    define('WEBPATH', '/zenphoto');
    define('SERVERCACHE', SERVERPATH . "/cache");
    define('WEBCACHE', WEBPATH . "/cache");

    In config.php too?
  • for me, I put it in the config.php right under where I set mod rewrite to false. Not sure if it makes to much of a difference "where you put it, as long as you dont tie it in with the actual code they got in there.
  • I entered that bit in config.php but now it just says "Error: The 'albums' directory cannot be found or is not readable."

    I just had to change "zenphoto" to what I named my zenphoto folder, right? Mine's "gallery".

    Hmmm.
  • 1) In config.php change the following line:
    `$conf['mod_rewrite'] = true;`
    to:
    `$conf['mod_rewrite'] = false;`

    2) Then, ANYWHERE in your config.php, copy and past the following:
    `define('SERVERPATH', '[full path]/zenphoto');

    define('WEBPATH', '/zenphoto');

    define('SERVERCACHE', SERVERPATH . "/cache");

    define('WEBCACHE', WEBPATH . "/cache");`

    3) Where the above says, `'[full path]/zenphoto'` change this to the full path to the directory where you placed zenphoto. For example, my line would look something like:
    `define('SERVERPATH', '/home/www/gamedudex/public_html/zp');`

    4) Edit the next line to reference the Web path to the zenphoto directory. So continuing the example from above this would look something like the following for me:
    `define('WEBPATH', '/zp');`
    because the URL to the gallery would be http://www.gamedudex.com/zp

    5)The next line would point to your cache directory (which should be inside your zenphoto directory), so if you have not moved the location of your cache folder, you can leave the last two lines alone. If you have moved them, make sure you change the last two lines to reflect those changes.
  • trisweb Administrator
    Sounds like the path resolution changes were not too good... sorry about that.

    The fix GameDudeX posted should indeed work to set the paths manually, but that means you have to know what they are.

    I'll definitely look into this problem before the final release.
  • Thanks GameDudeX, now the gallery and album pages show up, but the individual photo pages are broken links. =/ And I'm not sure the URL is wrong, either, for instance http://aneesah.pixelled.com/gallery/index.php?album=photos&image=blown.jpg is the address for an image in the photos album, but I get the broken image icon.
  • Works beautifully, thanks! I had to make a slight alteration to i.php again, at line 88:

    $fp=fopen($newfile,"w");fclose($fp);
  • Regular links on the page are now being tranformed from (example) friends.php :

    http://www.thekhans.me.uk/friends/gallery/Shimla+Pinks/origami.php

    Which subsequently yields 'image not found' error. Oddly enough, the source code reveals that the link is indeed friends.php - so I'm not sure why the browsers are loading another address.

    Saj
  • I currently am having issues with this too. I just install version 1.01 and tried to fix the problem by adding the above, which got everything working except for images, which are still borked. Any suggestions?
  • make sure the albums directory and cache directory are chmod 777
  • ya they are

    edi: created new post for my problem
    http://www.zenphoto.org/support/topic.php?id=233
  • Jan Member
    Any updates on this issue? Is there a fix on the way?

    PS. Thanks for such a lovely gallery!
  • I think there is a much easy way of fixing this issue that GameDudeX's solution and it allows you to keep MOD_REWRITE switched on.

    I have posted this a few times already and it seemed to help people so I will post it again:

    Keep the config.php file standard then edit the zen/functions.php file as follows

    ----------------------------------------
    <?php
    // functions.php - HEADERS NOT SENT YET!

    require_once("config.php");
    /*comment out this bit
    if (strstr(basename(dirname($_SERVER['SCRIPT_NAME'])), "zen")) {
    define('WEBPATH', dirname(dirname($_SERVER['SCRIPT_NAME'])));
    } else {
    define('WEBPATH', dirname($_SERVER['SCRIPT_NAME']));
    }
    */
    define('WEBPATH', '/zp');//or whatever dir you installed to

    ----------------------------------------
    And thats it.
  • Thanks Biffta. That's a great fix to have!
  • Jan Member
    @Biffta: Thanks, got it to work now. :)
  • Wow, this just messed up the pages more for me. I must be the black sheep.

    It's strange . . .I can see everything when I go in from "setup.php" but not if I just try to go straight to a page.

    I have mod rewrite off
    I've checked my .htaccess file to make sure the path is /zenphoto (my directory) and don't know what else to try.

    Your fix causes my pages to get a PARSE ERROR and tell me a line. REally wondering what is going on. When I'm in Admin, by logging in it's fine, when I try to View Gallery or Logout I get page not found errors or on some pages, 505 errors.
    ugh

    Such a beautiful interface, I want to be able to put my design degree to use and give you all some Themes. : (
    Maybe I should have taken computer science.

    tanya
  • trisweb Administrator
    Tanya! Try again, we want your design degree!! ;-)

    The "Parse error" is probably because you made a mistake in your PHP. Unfortunately you do pretty much have to know the basics of PHP to fix that. Send me an email and I might be able to help you better (trisweb at my domain name, or at gmail.com).
  • @biffta, thankyou thankyou thankyou!!

    got it working with mod_rewrite ON

    superb thanks!
  • Well I think I must give up....try everything and still can 't make this work.

    now I getting "albums" not found or not readble
    I double check and albums and cache are 777

    Any help?
  • please give us more information.
    Are you using mod-rewrite or not?
    if yes.. what path do you have in the .htaccess file?
    Linux or Windows?
    Did you use the fix above?
  • I use the solution where you edit functions.php
    This is what I have
    <?php
    // functions.php - HEADERS NOT SENT YET!

    require_once("config.php");
    if (strstr(basename(dirname($_SERVER['SCRIPT_NAME'])), "zen")) {
    define('WEBPATH', dirname(dirname($_SERVER['SCRIPT_NAME'])));
    } else {
    define('WEBPATH', dirname($_SERVER['SCRIPT_NAME']));
    }

    define('WEBPATH', '/zenphoto');//or whatever dir you installed to

    Mod-rewrite is set to TRUE
    Is on a linux server

    my path is.
    /www.billbody.com.ar/zenphoto/
    You can check on billbody.com.ar/zenphoto/zen/setup

    So I really don't know where to go now...
  • I am sorry I meant the fix posted by legobuff where you edit the config.php..

    What host are you using by the way..are they using cgi redirects to point to the website?
  • well I try the config solution too, but still nothing
    My hosting is on a paid plan.
    I check with them the path, and have no idea about the cgi, I think that they don't but not sure about that.

    T.I.A
  • Hey guys, I've just managed to get ZenPhoto working and thought I'd document my problems a little. My main problems weren't with paths as the solutions to these are on this forum but by not having "short tags" or "asp style tags" enabled in php.ini. When I changed these to be on and restarted the webserver ZenPhoto started as expected.

    However, I was still not seeing a gallery being displayed and the gallery page looked strange, almost like the CSS wasn't being applied to it. The problem was the the GD extension in PHP wasn't enabled by the webserver. When I enabled this everything worked fine.

    It's a fantastic product and just what I was looking for!

    (apologies for the double post, if an admin could remove it I'd be most grateful :))
  • well I must give up, really don't know why this is not working.
    Any way thanks for your help!

    See iu around
This discussion has been closed.