webpath and serverpath with ZP 1.0.3

Hi everyone,

I successfully installed ZP on one of my web host and now I'm trying to install ZP on another web host. I'm currently having a problem with this host. It doesn't allow mod_rewrite so I switched it to False. I also needed to delete the .htaccess file. Now it still doesn't work. I tried to define the webpath and serverpath but I can't get it to work. The webpath is quite easy to define but how can I know the serverpath ?

I tried this :
define('SERVERPATH', dirname(dirname($_SERVER['SCRIPT_FILENAME'])));

and now it get this error :
"Error: The 'albums' directory cannot be found or is not readable."

I tried to put the directory to 777 (with Filezilla) but it doesn't seem to work.

Any ideas ?

Thanks a lot !

Bye

Comments

  • to define the serverpath you need to read that from phpinfo

    create a file and call it phpinfo.php

    inside of it put this

    <?php
    phpinfo();
    ?>
    upload it to your zenphoto directory

    run it from your browser
    domainname.com/zenphoto/phpinfo.php

    find your serverpath.. this is what you want to put in.

    What type of server is this.. IIS/Apache?
  • Thanks for your answer. Actually, it seems that PHP isn't working on the server ... I cannot get any of my PHP apps to work right now (including "phpinfo.php") although Php 4 and 5 are installed on the server. It must be a bug and I hope everything gets back soon !

    The server is Apache 1.3.29.
  • Finally I found the solution to my problem. I used this :

    define('SERVERPATH', $_SERVER['DOCUMENT_ROOT'].'/photos');

    and it works.
  • I'm having this same problem. When I first set things up I was able to use the admin pages to upload images and edit albums but I wasn't able to VIEW the albums. I then tried modifying the Path Overrides section of the config file but not sure if I'm doing it right.

    You can see my server path here:

    http://friendsofthejeninfreedomtheatre.org/info.php

    and this is what I put in my config file:

    define('WEBPATH', '/zen');
    define('SERVERPATH', '/home/members/jeninfreedomtheatre/sites/friendsofthejeninfreedomtheatre.org/web/');

    Am I reading the server path correctly from info.php?

    Could it be a problem that I named the top directory 'zen' as in...

    friendsofthejeninfreedomtheatre.org/zen/

    instead of...

    friendsofthejeninfreedomtheatre.org/zenphoto/
  • trisweb Administrator
    You should not need to set the web and server paths in the latest version. (Are you using 1.0.8.2?) That should be done automatically. Try commenting them out again.

    If you really want to set them manually, the /zen is fine, but then the SERVERPATH should be `/home/members/jeninfreedomtheatre/sites/friendsofthejeninfreedomtheatre.org/web/zen` with the /zen on the end, as it points to the zenphoto directory.

    Try it without those lines enabled, it should work. You may have a different problem.
  • Yes, I'm using 1.0.8.2.

    I deleted everything (including the tables) and installed a fresh copy. The same error occurred. I then changed this line:

    $conf['mod_rewrite'] = true;

    to:

    $conf['mod_rewrite'] = false;

    and everything works. I guess I can live with this if all it means is that my paths will be less than elegant. I also use Wordpress and I'm pretty sure it uses mod_rewrite successfully.

    (I tried setting them manually with mod_rewrite set to true using yoru corrected path and still saw the error.

    Thanks.
  • trisweb Administrator
    Based on the links on the home page of http://jeninfreedomtheatre.mayfirst.org/ (or friendsofthejeninfreedomtheatre.org) it looks like mod_rewrite isn't working there as well.

    If you ever do get mod_rewrite to work, don't forget to change the RewriteBase path in .htaccess.
  • You're right! I don't know what I was thinking. I've installed this implementation of Wordpress and Zenphoto on a different host company's servers than what I usually use. All my other web sites are on another company's servers and THOSE are the ones where mod_rewrite is working. I guess I've been installing new sites on those servers for so long that I've forgotten what it's like to work with a new company! I haven't really tested this new server's capabilities yet. I'll check with them about this. Thanks again.
  • While waiting for some assistance from the new hosting company I installed zenphoto on my other server: http://BikramYogaDecatur.com/zenphoto

    I've got an .htaccess file in my home directory that I added this to:

    RewriteBase /zenphoto

    No good. I then tried using a hard path:

    RewriteBase /home/users/web/b857/moo.bikram/zenphoto

    Still no good.

    I then tried placing the .htaccess file in the zenphoto directory. Still not working.

    Am I missing something obvious?

    ref: http://bikramyogadecatur.com/zenphoto/info.php
  • it doesnt look like that server supports mod-rewrite

    but also, you said "I then tried placing the .htaccess file in the zenphoto directory. Still not working."

    it SHOULD be in the zenphoto directory. and in your case should have /zenphoto as the rewrite base..
  • Yeah, I did finally figure out that the .htaccess file needed to be in the zenphoto directory -- I wasn't clear about that initially.

    I *know* that mod_rewrite is installed on friendsofthejeninfreedomtheatre.org and I've got the following line written to the .htaccess file which is in the zenphoto directory. I get nice cruft-free urls but I still get a 404 error when clicking on them. You can see this now at http://friendsofthejeninfreedomtheatre.org/zenphoto/ .

    My latest idea... shouldn't the urls be this:

    http://friendsofthejeninfreedomtheatre.org/zenphoto/albums/test/
    http://friendsofthejeninfreedomtheatre.org/zenphoto/albums/eric/

    instead of this:

    http://friendsofthejeninfreedomtheatre.org/zenphoto/test/
    http://friendsofthejeninfreedomtheatre.org/zenphoto/eric/

    The latter is what I'm seeing but the former is where the images actually live.

    As for the http://BikramYogaDecatur.com server you are right about mod_rewrite not being installed. I was sure it was because I use Wordpress on that site and I have permalinks working and it's able to change this:

    http://bikramyogadecatur.com/blog/?p=123

    to this:

    http://bikramyogadecatur.com/blog/article_name

    I thought that was dependent on mod_rewrite. I guess I'm wrong about that.

    Thanks for the assistance.
  • Found the answer to the url "albums" question in the FAQ.
Sign In or Register to comment.