Member
Member
johnd126   2009-12-02, 06:07
#1

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

Administrator
Administrator
acrylian   2009-12-02, 10:41
#2

You might need to set the webpaths on the zp-data/zp-config.php file manually.

Member
Member
johnd126   2009-12-02, 20:57
#3

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.

Administrator
Administrator
acrylian   2009-12-02, 21:09
#4

I meant those lines. You mean the rewrite path within the htaccess file, not the file itself I assume?

Member
Member
johnd126   2009-12-02, 23:17
#5

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?

Member
Member
sbillard   2009-12-03, 02:06
#6

So, what version of Zenphoto? (Always helps to read the forum rules before asking for help. That you know what information we need to be able to help you.)

Member
Member
johnd126   2009-12-03, 04:00
#7

I've downloaded and installed zenphoto 1.2.7 just two days ago. It's running on Windows XP with Apache 2.0.63 and PHP 5.2.11.

Administrator
Administrator
acrylian   2009-12-03, 10:12
#8

Well, the .htaccess file MUST be named .htaccess, otherwise it does not work. Perhaps your server does not support modrewrite functionality.

Member
Member
johnd126   2009-12-03, 18:36
#9

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.

Administrator
Administrator
acrylian   2009-12-03, 19:28
#10

Actually zenphoto can run either in the root or a folder. I see no reason why not from a folder within a folder but the htaccess file needs to reflect that of course.

Member
Member
sbillard   2009-12-04, 00:14
#11

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.

Member
Member
johnd126   2009-12-05, 03:37
#12

That appears to have fixed it! I'll keep trying to stuff to make sure it doesn't affect something else.

Thanks.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.