| Author |
Message |
Buzzman25
Beginner


Joined: Jan 14, 2004 Posts: 10
|
Posted: Fri Sep 30, 2005 3:05 pm Post subject: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
Ok, I don't know if this is supported yet, but since Gallery 2 implemented the ability to multisite using one core installation and several small multisite files, will your integration work with the small multi sites?
I only ask since that is what I have and when I put down all my info and do everything that I believe is right, I get one of two errors.
If my configuration is set this way
Quote: › Full file path to your Gallery 2 directory: /www/public/htdocs/forum/modules/gallery2/
URL to the gallery2.php file: gallery2.php
URL path from you webroot to gallery2.php: /forum/
Relative file path to your Gallery 2 directory: modules/gallery2
URL to your login.php file: login.php
Cookie path: /forum/
Active User ID: 0
I get this error when trying to access gallery
Quote: › Error (ERROR_MISSING_OBJECT) : admin GalleryUser
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 138 (gallerystatus::error)
* in modules/core/classes/GalleryCoreApi.class at line 2225 (galleryentityhelper_simple::loadentitybyexternalid)
* in modules/core/classes/GalleryEmbed.class at line 184 (gallerycoreapi::loadentitybyexternalid)
* in modules/core/classes/GalleryEmbed.class at line 94 (galleryembed::checkactiveuser)
* in /www/public/htdocs/forum/gallery2.php at line 68 (galleryembed::init)
I read up and I have found that this is caused when you don't sync your users, so I tried and I got this
Quote: › Warning: g2addexternalmapentry(/www/public/htdocs/forum/modules/gallery2//modules/core/classes/ExternalIdMap.class): failed to open stream: No such file or directory in /www/public/htdocs/forum/admin/gallery2_export.php on line 136
Notice the double slash, so I removed it from my configuration
/www/public/htdocs/forum/modules/gallery2 instead of /www/public/htdocs/forum/modules/gallery2/
I get the same error but don't have the double slash, however when I try to access the gallery page again I then get this
Quote: › Warning: main(/www/public/htdocs/forum/modules/gallery2embed.php): failed to open stream: No such file or directory in /www/public/htdocs/forum/gallery2.php on line 64
So I edited your gallery 2 file to change that line
require_once($fullpath . 'embed.php'); -> require_once($fullpath . '/embed.php');
It works to access the gallery page like I did before, but I still am unable to synch the users and get anything to work.
Any thoughts? |
|
| Back to top |
|
|
AdBot
|
| Post subject: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
|
|
|
| Back to top |
|
 |
Buzzman25
Beginner


Joined: Jan 14, 2004 Posts: 10
|
Posted: Sat Oct 01, 2005 6:48 pm Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
Ok, after reading my problem over, I thought I might have a fix.
I tried changing my "Full file path to your Gallery 2 directory" to point to where I have my gallery 2 source installed. When I tried syncing this time it said:
The requested URL /forum/admin/install/ was not found on this server.
I'm still at a loss at what I should do.  |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Oct 03, 2005 6:27 am Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
| actually, i haven't tried doing the integration with multisite yet. if you are able to tinker and get it to work, let me know and i'll include your info (with credits) in the package. |
|
| Back to top |
|
|
Buzzman25
Beginner


Joined: Jan 14, 2004 Posts: 10
|
Posted: Mon Oct 03, 2005 8:31 pm Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
Oh dear lord I don't know what's going on.
I was going to post a fix, but when I went back and tried to figure out what I did, I'm not finding it.
It seems that all I did was change the file "gallery2.php" from this
require_once($fullpath . 'embed.php');
to this
require_once($fullpath."/".'embed.php');
this allows you to use or not use a / in your configuration file.
I'm going to have to try another vanilla install of both and see if that's really all that it was. |
|
| Back to top |
|
|
Buzzman25
Beginner


Joined: Jan 14, 2004 Posts: 10
|
Posted: Mon Oct 03, 2005 9:27 pm Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
Well...I'm at a loss. I redid the entire install and I came to the same results...it mysteriously started working. I'm going to try one more thought. I've narrowed it down to one of two things.
1. You change the line in /admin/gallery2_export.php from
require_once ($row['fullPath']."/".'modules/core/classes/ExternalIdMap.class');
to
require_once ('/your/actual/path/to/gallery2/modules/core/classes/ExternalIdMap.class');
or it's a problem when logging in as an administrator and you need someone with anonymous access to hit the page first before it will sync you.
Will post what I find. |
|
| Back to top |
|
|
sparker
Beginner


Joined: Oct 04, 2005 Posts: 2
|
Posted: Sat Nov 05, 2005 6:30 pm Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
I've been trying this too, and it appears that many of the references to "components" of gallery2 (class files, etc) are "hard-coded". I think what has to happen is there needs to be one more variable in the integration that indicates where the core gallery files reside, and that most of the references to gallery2 files need to point there.
The only files that live in the "multisite" directory are:
%ls -FR
config.php* index.php* main.php* upgrade/
embed.php* lib/ modules/ upgrades/
./lib/support/index.php*
./modules/core/templates/blocks/local/BreadCrumb.tpl*
./upgrade/index.php*
Everything else is in the core directory. |
|
| Back to top |
|
|
steviec
Beginner


Joined: Mar 04, 2004 Posts: 3
|
Posted: Sun Nov 20, 2005 4:26 am Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
Buzzman25 wrote: ›
It seems that all I did was change the file "gallery2.php" from this
require_once($fullpath . 'embed.php');
to this
require_once($fullpath."/".'embed.php');
this allows you to use or not use a / in your configuration file.
Hi
I followed Buzzman25's recommendations however I was still receiving errors in my apache log. Basically I am running phpbb in the root directory and gallery in a sub directory.
I changed the line to reflect that and it now works.
require_once($fullpath."gallery/".'embed.php');
Your observation with regards to the account sync seems to be correct, when I click on the Gallery2 link whilst not logged in, it works fine however if I log in whilst as admin I get a nice error!
Cheers |
|
| Back to top |
|
|
steviec
Beginner


Joined: Mar 04, 2004 Posts: 3
|
Posted: Sun Nov 20, 2005 4:32 am Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
Once more observation you will need to change
require_once($fullpath . 'embed.php');
to this
require_once($fullpath."/".'embed.php');
Otherwise you cannot logout/login
Cheers |
|
| Back to top |
|
|
SnT2k
Beginner


Joined: Dec 17, 2005 Posts: 1
|
Posted: Sun Dec 18, 2005 2:09 am Post subject: Re: Multisite Gallery 2 Integration with phpBB 2.0.x |
|
|
I check the code a little bit and managed to fix the issue on finding the ExternalIdMap.class:
In gallery2_export.php
find and replace
PHP: › <?php require_once ($row['fullPath']."/".'modules/core/classes/ExternalIdMap.class');
$ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId)); ?>
to this
PHP: › <?php $ret = GalleryEmbed::addExternalIdMapEntry( $externalId, $entityId, $entityType ); ?>
{edit}It still won't export -_- GalleryEmbed::createUser() didn't complain, but when I checked the gallery user database.. nothing changed...
{another edit} Solved it finally... changed the database from "MySQL w/ transactions" to plain MySQL..... |
|
| Back to top |
|
|
|
|
|
|
|