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
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?
The server is Apache 1.3.29.
define('SERVERPATH', $_SERVER['DOCUMENT_ROOT'].'/photos');
and it works.
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/
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.
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.
If you ever do get mod_rewrite to work, don't forget to change the RewriteBase path in .htaccess.
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
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..
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.