Posted: Wed Nov 16, 2005 6:54 pm Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
Thanks for helping out. When I go to the module in the admin panel, the settings information stays as it was previously, it won't update even if I add in the setting info myself in the panel. If I do input the info, then it overwrites the new cfg file I uploaded with the old information.
Btw, if I just upload the new cfg file and leave the old settings on the panel alone, and go to Export Users to Gallery2, I will still get a white page.
Joined: Mar 28, 2005 Posts: 10 Location: Hackensack, NJ
Posted: Sat Nov 19, 2005 10:59 pm Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
I have been trying to set up gallery 2 on my phpnuke site for almost straight 24 hours now. I usually dont give up but looks like I am totally lost.
It is the admin blank page issue.
I downloaded the gallery 2 from the nukedgallery site and then the latest gallery2 integration package from http://galleryupdates.jpmullan.com/inte ... hpnuke.zip
I installed phpnuke and gallery 2 on my local pc which is a windows server and set up gallery 2 and integrated and everything is working fine.
When i tried to duplicate the effort on my public site things not working as expected. The standalone gallery is working fine.
However when i try to set the Gallery2 Integration Settings I get a blank page.
I then went and edited the gallery.cfg file.
I still the blank page (popup) when i try to export the users. The funny thing is that the gallery module(hidden) seems to be working and i can use the module. Also the users were successfully exported even though i get an empty popup.
Joined: Mar 28, 2005 Posts: 10 Location: Hackensack, NJ
Posted: Sun Nov 20, 2005 2:22 am Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
i think i found an issue - SaveG2Config(modules/gallery2/admin/index.html) is calling init but init function has been taken out from modules/gallery2/admin/index.html
I put the deleted init function (+the other functions - didnt check if they are needed or not) back in the index.html and it is working.
Earlier it was updating the config but init was failing.
Also the user export popup - the ob_end_flush was causing the function. I played around with it for some time and now it is working.
here is the complete code for the page. perhaps you might find this useful
Code: ›
<?php
/*
* $RCSfile: export.php,v $
*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2005 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* Gallery 2 integration for phpnuke.
* @version $Revision: 1.1 $ $Date: 2005/11/16 18:05:32 $
* @author Dariush Molavi <dari@nukedgallery.net>
*/
/*********************************************************/
/* True if init() was called, else false */
/*********************************************************/
function isInitiated($newvalue = null) {
static $initiated;
if (!isset ($initiated)) {
$initiated = false;
}
if (isset ($newvalue) && (is_bool($newvalue) || is_int($newvalue))) {
$initiated = $newvalue;
}
return $initiated;
}
/*********************************************************/
/* Init G2 API */
/*********************************************************/
function init() {
global $gallery;
if (!$ret->isSuccess()) {
message_die(CRITICAL_ERROR,'G2 did not return a success status upon an init request. Here is the error message from G2: <br /> [#(1)]'.$ret->getAsHtml());
return false;
}
isInitiated(true);
return true;
}
/*********************************************************/
/* Export PHPNuke Users to Gallery 2 */
/*********************************************************/
function userExport() {
global $db, $gallery, $failures, $prefix;
include("modules/".MOD_NAME."/gallery2.cfg");
require_once ($g2embedparams['embedphpfile']."/embed.php");
require_once ($g2embedparams['embedphpfile']."/".'modules/core/classes/ExternalIdMap.class');
// init G2 transaction, load G2 API, if not already done so
if (!init()) {
return false;
}
// Load all existing phpnuke <-> G2 mappings
list ($ret, $mapsByExternalId) = GalleryEmbed::getExternalIdMap('externalId');
if ($ret->isError()) {
return false;
}
// Map the ExternalMapId "admin" to the last phpnuke admin account found
list ($ret, $adminGroupId) = GalleryCoreApi::getPluginParameter('module', 'core', 'id.adminGroup');
if ($ret->isError()) {
flush();
g2_message('Unable to fetch the admin group. Here is the error message from G2: <br />'.$ret->getAsHtml());
return false;
}
// Grab all the existing G2 admins
list ($ret, $adminList) = GalleryCoreApi::fetchUsersForGroup($adminGroupId);
if ($ret->isError()) {
flush();
g2_message('Unable to fetch a member in the admin group. Here is the error message from G2: <br />'.$ret->getAsHtml());
return false;
}
end($adminList);
$adminId = key($adminList);
if (!isset ($mapsByExternalId["admin"])) {
$ret = ExternalIdMap::addMapEntry(array('externalId'=>"admin", 'entityType'=>'GalleryUser', 'entityId'=>$adminId));
if ($ret->isError()) {
flush();
return false;
}
}
// TODO: Update of the admin account if it already exists
$sql = "SELECT count(*) AS ucount, MAX(user_id) AS max_user_id FROM " . $prefix . "_users";
$user_count = $db->sql_fetchrow($db->sql_query($sql));
$ucount = intval($user_count['ucount']) - 1 ;
$max_id = $user_count['max_user_id'];
$users_imported = 0;
if(count($failures) != 0) {
echo "<br />The import of the following PHPNuke user_id's failed:<br />";
foreach($failures as $bad_id) {
echo $bad_id."<br />";
}
echo "The most common reasons for failed imports are:"
."<ul><li>Duplicate PHPNuke usernames</li><li>A PHPNuke username of \"guest\"</li><li>A PHPNuke username consisting of only numbers</li></ul>"
."Check the failed user_ids and re-run the export";
}
Posted: Tue Dec 06, 2005 8:33 pm Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
Hi...
Been searching through the forums for sometime now, I think I have tried every single 'fix'. I seem to still be getting at blank page when I navigate to the gallery page.
Just plain blank. I have installed gallery2 a few times, I have also copied all the files for the integration package a few times, checked the SQL database, I have played around with the gallery.cfg
Posted: Wed Dec 07, 2005 7:46 pm Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
i'm in a similar situation as nickyu, 7.7, setting this up on a remote server. i've battled with it for a few days now, re-installing both gallery and the integration several times. the gallery was working fine, done the integration and i'm now getting the blank page problem. here is my current gallery2.cfg
in the original gallery2.cfg file the $g2configurationdone = 'true'; is set to NULL, so i set it to true, like in the many examples in this thread. this made the gallery nuke block seem to work a little (bear with me here). it has a search box, advanced search link and a view slideshow link .
having this part made this blocks links point to the right place
'embedPath' => '/site/',
even though i'm still getting the blank page problem
but when you do what you suggested:
'embedUri' => 'site/modules.php?name=Gallery2',
it made the blocks links point to site/site/modules.php?...etc
not sure if any of that is useful. anyhows, i still can't get the darn thing to work so i hope you can help.
Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
Posted: Thu Dec 08, 2005 7:27 am Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
nickyu wrote: › unfortunately that didnt work. I will try a complete re-install yet again
Is everyone else running version 7.7? I installed it off Cpanel on my server, could that be a problem?
Nick
you installed gallery 2 or phpnuke from Cpanel? are you using nuke platinum or any of the sentinel/protector modules for phpnuke? also, make sure that you disable/uninstall the embedded rewrite module from within the gallery 2 admin.
Posted: Fri Dec 16, 2005 3:57 am Post subject: Re: [SOLVED] Blank page, nothing writing to G2 db
Hi All,
I've been trying to install Gallery with PHP-Nuke for a few days now, and its just not working. I am using Nuke v. 7.7 and Gallery 2.02 with the latest update from here. I, too, am having the blank page problem, though no problems with the Administration pages. I am using English as the default language. Here is the information from the nuke_g2config table:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum