Hi
Just installed zenphoto on my windows server (running apache).
When I try logging from http://myserver/zenphoto/zp-core/admin.php it tries to redirect to http://myserver/zenphoto/C:\webroot\myserver\zenphoto\zp-core\admin.php
What do I have set incorrectly to cause this?
Thanks
I assume you mean these:
//define('WEBPATH', '/zenphoto');
//define('SERVERPATH', 'c:/webroot/myserver/zenphoto');
I did uncomment each of these and try different settings for both of them (not sure which one applied) but it didn't make a difference.
Would the settings in the .htaccess file come into play? I use a custom named version of the file and renamed the .htaccess file to match the name I use but it didn't make a diff either.
Once I re-browse to http://myserver/zenphoto/zp-core/admin.php I'm logged in and everything works ok so it only seems to affect that one refresh.
No, I DO mean the file itself. I changed the name '.htaccess' to something else unique for other reasons years ago. The RewriteBase /zenphoto directive in the file itself is correct so I didn't have to adjust that.
I see this in the source of the admin.php page before I log in:
``
In all other cases after I'm logged in the paths are /zenphoto/something ... only in this case is it showing a local path rather than a URL. Where does it get this from?
The mod_rewrite IS working as things are now: for instance when I browse to http://myserver/zenphoto/admin I am redirected to http://myserver/zenphoto/zp-core/admin.php. It's only the redirect path within the output of the admin.php itself which is being created incorrectly. Is mod_rewrite used for that?
Is there an issue with zenphoto being in a directory a couple up from the root? I.e. I have it in c:\webroot\myserver\zenphoto.
ADMIN does not use mod_rewrite for any of its URLs.
find the function currentRelativeURL in admin-functions.php and change it so it reads:
function currentRelativeURL($source) { $source = str_replace('\\','/',$source); $source = str_replace(SERVERPATH, '', $source); $q = ''; if (!empty($_GET)) { foreach ($_GET as $parm=>$value) { $q .= $parm.'='.$value.'&'; } $q = '?'.substr($q,0,-1); } return pathurlencode($source.$q); }
I suspect this will fix the problem, but I do not have a Windows server, so cannot confirm.