I am having trouble trying to embed g2 into cmsms. The php error I get is:
PHP Fatal error: Call to undefined method mysql_driver_ResultSet::FetchRow() in /usr/local/lib/gallery2/modules/core/classes/GalleryStorage.class on line 1279
This is a multi install setup of gallery2. However, i downloaded the sample embed zip file and tried that stand alone, in the cmsms directory and that worked fine. The file was run from /site/test.php. So something weird is happening.
The install of cmsms resides in /site and the gallery install is in /gallery2.
Here is the snippet of code im currently playing with while attempting to embed it:
$g2_embedding = "/home/path/to/gallery2/embed.php";
require_once($g2_embedding);
// if anonymous user, set g2 activeUser to ''
$uid = '';
// initiate G2
$ret = GalleryEmbed::init(array('g2Uri' => '/gallery2/',
'embedUri' => '/site/index.php?page=gallery2',
'activeUserId' => $uid));
$g2data = GalleryEmbed::handleRequest();
// show error message if isDone is not defined
if (!isset($g2data['isDone'])) {
print 'isDone is not defined, something very bad must have happened.';
return false;
} else if($g2data['isDone'])
{
exit; // G2 has already sent output (redirect or binary data)
}
// Use $g2data['headHtml'] and $g2data['bodyHtml']
// to display G2 content inside embedding application
// if you don't want to use $g2data['headHtml'] directly, you can get the css,
// javascript and page title separately by calling...
$this->g2data = $g2data;
return true;
Any suggestions as to what may be going on?
Posts: 32509
> PHP Fatal error: Call to undefined method mysql_driver_ResultSet::FetchRow() in /usr/local/lib/gallery2/modules/core/classes/GalleryStorage.class on line 1279
does your integration replace / change GalleryStorage.class ???
there's no mysql specific code in that file.
Posts: 57
Nope, it doesnt change or replace GalleryStorage.class.
The error appears to be thrown above when the GalleryEmbed::handleRequest() function is called. I'm rather confused as to whats happened
Posts: 57
I have changes things around a bit, and now I am getting:
The variables i'm passing are:
[embedUri] => /site/index.php?page=gallery
[g2Uri] => /gallery2/
The G2 Embed Code is:
Posts: 8339
isError() is from gallery 2.0, there are several other simple embed examples for Gallery 2.1 or greater.
Try here.
-s
Posts: 57
Now i'm back to the same orginional error:
PHP Fatal error: Call to undefined method mysql_driver_ResultSet::FetchRow() in /usr/local/lib/gallery2/modules/core/classes/GalleryStorage.class on line 1279
Posts: 45
I'm curious how to get Gallery 2 into CMSMS.
I'm allready using Gallery for some time now but I'm very new in CMSMS.
Can somebody help me and tell me what exactly to do.
I looked around in the forums but could not really find any helpfull things. The only thing that I did was creating the gallery2embedded.php file.
Cheers,
Rudolf.
Posts: 57
I am currently working on a module for CMSMS that will do all the grunt work for you. The project page is here: http://dev.cmsmadesimple.org/projects/gallery2embed/
Posts: 45
Great! Really looking forward to the stuff...!!
Rudolf.