[SOLVED] Problem logging admin in on secondary multisite G2

samkuhn2

Joined: 2004-04-13
Posts: 60
Posted: Mon, 2005-02-14 19:46

I installed the latest CVS available today (Feb 13th?). I setup my primary gallery2 and tested it, it work fines. I then made an additional install utilizing the simlink. I made a different data directory, and used a different table and column prefix on the secondary database and the primary one.

When I finish the install and attempt to login as admin in the secondary gallery, I leave the URL:
http://photos.bcheck.net/main.php?g2_view=core:UserAdmin&g2_subView=core:UserLogin&g2_return=http%3A%2F%2Fphotos.bcheck.net%2Fmain.php%26g2_GALLERYSID%3Dcb413ccb8328d86ef6a875ede218db9d&g2_GALLERYSID=cb413ccb8328d86ef6a875ede218db9d&g2_returnName=album&g2_navId=

and attempt to go to the URL:
http://photos.bcheck.net/main.php?g2_GALLERYSID=cb413ccb8328d86ef6a875ede218db9d
which is blank.. as in, no source for the page at all. This happens in IE and Mozilla, and after I clear the cache in my browser.

The session file that matches the ID looks like:
a:3:{i:0;i:1108409370;i:1;a:2:{i:0;s:11:"129.59.93.8";i:1;s:32:"2581833420733f29e9446ab1312d0ac0";}i:2;a:3:{s:18:"
core.id.activeUser";i:5;s:15:"permissionCache";a:1:{i:0;a:4:{s:9:"core.view";a:1:{i:6;i:1;}s:12:"core.viewAll";a:1
:{i:6;i:1;}s:16:"core.viewResizes";a:1:{i:6;i:1;}s:15:"core.viewSource";a:1:{i:6;i:1;}}}s:15:"core.navigation";a:1
:{s:9:"x8e62c652";a:2:{s:4:"data";a:2:{s:9:"returnUrl";s:84:"http://photos.bcheck.net/main.php&g2_GALLERYSID=c
b413ccb8328d86ef6a875ede218db9d";s:10:"returnName";s:5:"album";}s:7:"nextIds";a:0:{}}}}}

If I go back to the base URL for the secondary gallery, I am logged in as admin. I continue to have future generate URLs send me to blank pages.

----

Gallery URL (optional):
Gallery version: CVS from feb-14(13?)-2005
Webserver (with version): Apache 2.0
Datatabase (with version): MySQL 4.1.8
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional): http://photos.kuhnfamily.net/lib/tools/phpinfo.php
Graphics Toolkit(s): IM/GD
Operating system: ClarkConnect (Fedora Core 2)
Web browser/version: Mozilla 5/IE 6

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-02-14 20:55

yay, glad to know someone is trying out the multisite functionality.. i haven't gotten any feedback on it since it was added.
i'm guessing that your first install was photos.kuhnfamily.net and the second install uses a symlink to point photos.bcheck.net to the same codebase? when I go to one site I see an album and the other is empty so it looks like the multisite config is working ok, pointing to different db tables and g2data dirs.
please look closely at the url after you login.. is the url missing a ? character or maybe has a & where it should have a ? (after main.php)... if so, then this is a known bug and not actually related to your multisite setup.. hopefully we'll fix it soon.

 
samkuhn2

Joined: 2004-04-13
Posts: 60
Posted: Mon, 2005-02-14 22:21

Thank you for your help!

Yes, you are correct in your description.

Adding a & to the end of the second URL does fix it.

The URLs as above are the complete URLs, copy and pasted from the address bar in Firefox. (IE has same).

When I logout I get the URL:
http://photos.bcheck.net/main.php?g2_controller=core:Logout&g2_return=http%3A%2F%2Fphotos.bcheck.net%2Fmain.php%3Fg2_GALLERYSID%3D2486b143de119d60af884dde0d85fa54&g2_GALLERYSID=2486b143de119d60af884dde0d85fa54&g2_returnName=album&g2_navId=
that also goes to a null/blank page.

If I can do more to help, let me know. I have debug running, but don't know where the log file is? Perhaps that could be added to the module description?

Regarding the multisite install, it is a great feature! In the install process it would be helpful that once the "multisite" install link has been hit if it would prompt for a new, unique database prefix set and a new, unique, data directory. It was not initially clear to me that these items were both needed.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-02-14 23:55

debug output is actually configured in config.php; the debug module doesn't turn this on (confusing, i know..)

i added a note about the g2data dir and database setup in the multisite instructions page.. good idea.

 
samkuhn2

Joined: 2004-04-13
Posts: 60
Posted: Tue, 2005-02-15 03:01

Here is my buffered debug I notice that the URL it sends me to in the address bar is http://photos.bcheck.net/main.php&g2_GALLERYSID=ee014e0569f7331c361285eef1ec1ad6
which is not the same as the one listed below....

Quote:
You are in debug mode so we are not automatically redirecting.
[continue]
http://photos.bcheck.net/main.php&g2_GALLERYSID=ee014e0569f7331c361285eef1ec1ad6?g2_fromNavId=x86023b80
Gallery Debug Output

file_exists(/var/www//g2databcheck/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
Unimplemented: GalleryUrlGenerator
file_exists(/var/www//g2databcheck/sessions/ee014e0569f7331c361285eef1ec1ad6)
clearstatcache()
filesize(/var/www//g2databcheck/sessions/ee014e0569f7331c361285eef1ec1ad6)
fopen(/var/www//g2databcheck/sessions/ee014e0569f7331c361285eef1ec1ad6, rb,
0)
flock(Resource id #30, 6, )
fread(Resource id #30, 318)
flock(Resource id #30, 3, )
fclose(Resource id #30)
file_exists(/var/www//g2databcheck/cache/module/core/0/0/0.inc)
Initializing navigation
Branched navigation: x86023b80
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/core/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_core ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/locale
file_exists(/var/www//g2databcheck//versions.dat)
file(/var/www//g2databcheck//versions.dat, )
[1108436392] can't guarantee 5 -- extending!
file_exists(/var/www//g2databcheck/cache/entity/0/0/4.inc)
file_exists(/var/www//g2databcheck/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../../modules/core/UserLogin.inc)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../../modules/core/UserLogin.inc)

(mysqlt): ROLLBACK

(mysqlt): SET AUTOCOMMIT=1

(mysqlt): SET AUTOCOMMIT=0

(mysqlt): BEGIN

(mysqlt):
SELECT
g2bcheck_User.gbcheck_id
FROM
g2bcheck_User
WHERE
g2bcheck_User.gbcheck_userName = 'admin'

file_exists(/var/www//g2databcheck/cache/entity/0/0/5.inc)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/cart/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_cart ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/cart/locale
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/customfield/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_customfield ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/customfield/locale
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/imageblock/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_imageblock ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/imageblock/locale
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/migrate/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_migrate ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/migrate/locale
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/sizelimit/module.inc)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/thumbpage/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_thumbpage ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/thumbpage/locale
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/watermark/module.inc)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_watermark ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/watermark/locale
file_exists(/var/www//g2databcheck/sessions/ee014e0569f7331c361285eef1ec1ad6)
fopen(/var/www//g2databcheck/sessions/ee014e0569f7331c361285eef1ec1ad6,
r+b, 0)
flock(Resource id #67, 6, )
fseek(Resource id #67, 0, 0)
fwrite(Resource id #67, ..., 544)
ftruncate(Resource id #67, 544)
flock(Resource id #67, 3, )
fclose(Resource id #67)

(mysqlt): COMMIT

(mysqlt): SET AUTOCOMMIT=1

realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)

(mysqlt):
SELECT
g2bcheck_UserGroupMap.gbcheck_userId
FROM
g2bcheck_UserGroupMap
WHERE
g2bcheck_UserGroupMap.gbcheck_userId = 5
AND
g2bcheck_UserGroupMap.gbcheck_groupId = '2'
LIMIT 1

realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../../)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/helpers/../../../../modules/debug/classes/DebugStatusFormatter.class)
file_exists(/var/www//g2databcheck/smarty/templates_c/%%4139478058)
file_exists(/var/www//g2databcheck/smarty/templates_c/%%4139478058)
mkdir(/var/www//g2databcheck/smarty/templates_c/%%4139478058, 755)
fopen(/var/www//g2databcheck/smarty/templates_c/%%4139478058/v_3, w, 0)
fclose(Resource id #78)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/debug/classes/../templates/local/DebugStatusFormatter.tpl)
file_exists(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/debug/classes/../templates/local/DebugStatusFormatter.tpl)
stat(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/debug/classes/../templates/DebugStatusFormatter.tpl)
realpath(/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/core/classes/../../..)
Binding text domain: modules_debug ->
/var/www/virtual/photos.kuhnfamily.net/gallery2/modules/debug/locale

Smarty too

Quote:
Smarty Debug Console
included templates & config files (load time in seconds):
gallery:templates/global.tpl (0.88477) (total)
gallery:layouts/matrix/templates/head.tpl (0.02772)
gallery:modules/core/templates/ShowItem.tpl (0.14331)
gallery:layouts/matrix/templates/albumBody.tpl (0.13873)
gallery:layouts/matrix/templates/pathbar.tpl (0.02094)
gallery:templates/sidebar.tpl (0.08005)
gallery:modules/core/templates/LoginSystemContent.tpl (0.01587)
gallery:modules/search/templates/SearchSystemContent.tpl (0.02398)
gallery:modules/cart/templates/CartSystemContent.tpl (0.01282)
gallery:modules/members/templates/MembersSystemContent.tpl (0.01326)
gallery:layouts/matrix/templates/itemNavigator.tpl (0.00491)
gallery:modules/customfield/templates/ItemDetails.tpl (0.00408)
gallery:layouts/matrix/templates/itemNavigator.tpl (0.00406)
gallery:templates/debug.tpl (0.69478)
assigned template variables:
{$CartSystemContent} Array (2)
links => Array (1)
0 => Array (2)
text => View Cart
params => Array (2)
view => cart:ViewCart
return => 1
count => 0
{$CustomFieldItemDetails} Array (1)
fields => Array (0)
{$MembersSystemContent} Array (2)
links => Array (1)
0 => Array (2)
text => Members List
params => Array (2)
view => members:MembersList
return => 1
membersCount => 1
{$SCRIPT_NAME} /main.php
{$SearchSystemContent} Array (1)
subView => search:SearchScan
{$ShowItem} Array (3)
item => Array (22)
_className => galleryalbumitem
id => 6
creationTimestamp => 1108408315
isLinkable => 0
linkId => empty
modificationTimestamp => 1108408315
serialNumber => 1
entityType => GalleryAlbumItem
parentId => 0
pathComponent => empty
canContainChildren => 1
description => This is the top of your Gallery
keywords => empty
ownerId => 5
summary => empty
title => Gallery
viewedSinceTimestamp => 1108408315
originationTimestamp => 1108408315
layout => empty
theme => empty
orderBy => empty
orderDirection => asc
layoutL10Domain => layouts_matrix
layoutBodyFile => layouts/matrix/templates/albumBody.tpl
{$form} Array (1)
formName => empty
{$head} Array (1)
tpl => Array (1)
layouts/matrix/templates/head.tpl => layouts_matrix
{$l10Domain} layouts_matrix
{$layout} Array (22)
item => Array (22)
_className => galleryalbumitem
id => 6
creationTimestamp => 1108408315
isLinkable => 0
linkId => empty
modificationTimestamp => 1108408315
serialNumber => 1
entityType => GalleryAlbumItem
parentId => 0
pathComponent => empty
canContainChildren => 1
description => This is the top of your Gallery
keywords => empty
ownerId => 5
summary => empty
title => Gallery
viewedSinceTimestamp => 1108408315
originationTimestamp => 1108408315
layout => empty
theme => empty
orderBy => empty
orderDirection => asc
user => Array (13)
_className => galleryuser
id => 4
creationTimestamp => 1108408315
isLinkable => 0
linkId => empty
modificationTimestamp => 1108408315
serialNumber => 1
entityType => GalleryUser
userName => guest
fullName => Guest
hashedPassword => QNjQbdde5f096e846d6b747c8cc2c11bd188
email => empty
language => empty
children => Array (0)
show => Array (5)
sidebar => 1
sidebarGreeting => 1
sidebarActions => 1
sidebarPeers =>
pathbar => 1
owner => Array (13)
_className => galleryuser
id => 5
creationTimestamp => 1108408315
isLinkable => 0
linkId => empty
modificationTimestamp => 1108419370
serialNumber => 2
entityType => GalleryUser
userName => admin
fullName => Gallery Administrator
hashedPassword => TAk`ea1f9aa76d345d2d15e409fd4a274980
email => empty
language => empty
viewCount => 19
childCount => 0
descendentCount => 0
parents => Array (0)
parent => empty
systemLinks => Array (1)
0 => Array (4)
text => Login
params => Array (3)
view => core:UserAdmin
subView => core:UserLogin
return => 1
url => http://photos.bcheck.net/main.php?g2_...
moduleId => core
systemContent => Array (4)
cart => Array (1)
cart => modules/cart/templates/CartSystemCont...
members => Array (1)
members => modules/members/templates/MembersSyst...
search => Array (1)
searchBox => modules/search/templates/SearchSystem...
core => Array (1)
login => modules/core/templates/LoginSystemCon...
itemDetailFiles => Array (1)
customfield => modules/customfield/templates/ItemDet...
itemLinks => Array (2)
0 => Array (4)
text => add album to cart
params => Array (3)
controller => cart:AddToCart
itemId => 6
return => 1
url => http://photos.bcheck.net/main.php?g2_...
moduleId => cart
1 => Array (4)
text => view slideshow
params => Array (2)
view => slideshow:Slideshow
itemId => 6
url => http://photos.bcheck.net/main.php?g2_...
moduleId => slideshow
columnSize => 3
currentPage => 1
totalPageCount => 0
navigator => Array (0)
jumprange => Array (0)
showAlbumOwner => 1
showImageOwner => 0
layoutUrl => http://photos.bcheck.net/layouts/matrix
{$main} Array (7)
viewBodyFile => modules/core/templates/ShowItem.tpl
viewL10Domain => modules_core
debug => file_exists(/var/www//g2databcheck/ca...
markupType => bbcode
validationUri => http%3A%2F%2Fphotos.bcheck.net%2Fmain...
isRightToLeft =>
gallery => Array (1)
version => 2.0-alpha-4+
{$status} Array (0)
{$tpl} layouts/matrix/templates/head.tpl
assigned config file variables (outer template scope):
{#files#} Array (0)
{#vars#} Array (0)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-02-15 04:25

the fix for that bug is in cvs. try tomorrow's snapshot.

 
samkuhn2

Joined: 2004-04-13
Posts: 60
Posted: Tue, 2005-02-15 15:08

Thanks for the fix!

I noticed in the unified config.php file it is a bit confusing which command flag belongs to which gallery. It is certainly a low priority, but perhaps sometime in the future the layout could be changed to more resemble the virtual host directives in apache (maybe this style is out dated now?). That is, there would be one set of instructions, then a a set of directives for each multisite. e.g.:

/*
* Instructions go here
*/

<multisiteAAA>
<debug on/off>
<password blah>
</multisiteAAA>

<multisiteBBB>
...
</multisiteBBB>