Xaraya Installation Fails

sabrie

Joined: 2005-09-17
Posts: 17
Posted: Sat, 2005-09-17 08:42

I have installed Gallery2, and evertyhing works great in stand alone mode. I grabbed the Xaraya integration package from http://galleryupdates.jpmullan.com/integrations/xaraya.tar.gz and do that installation in Xaraya. When I go to modify the configuration after setting the embed variable to true in the config.php and add the relative URL and G2 include paths on the web page it throws an error (below). When I go back to the config page it shows the proper paths. Anyone have any idea what is going on?

Thanks!

System Error
Function failed

Failed to create G2 user with extId [201]. Here is the error message from G2: <br /> [Error (ERROR_BAD_PARAMETER)<ul><li><b>in</b> modules/core/classes/GalleryEmbed.class <b>at line</b> 290 (gallerystatus::error) <li><b>in</b> xargallery2helper.php <b>at line</b> 226 (galleryembed::createuser) <li><b>in</b> xargallery2helper.php <b>at line</b> 1635 (xargallery2helper::g2createuser) <li><b>in</b> xaradmin/updateconfig.php <b>at line</b> 82 (xargallery2helper::g2xarusergroupimportexport) <li><b>in</b> /usr/local/www/xaraya-daoc/html/includes/xarMod.php <b>at line</b> 886<li><b>in</b> /usr/local/www/xaraya-daoc/html/index.php <b>at line</b> 93<li><b>in</b> /usr/local/www/xaraya-daoc/html/index.php <b>at line</b> 161</ul>]
Explanation:

The function executed correctly, but the result was a failure.
Stack:

at g2createuser(xargallery2helper.php:229)

Array
(
[0] => 201
[1] => Array
(
[uid] => 201
[uname] =>
[name] =>
[email] =>
[pass] => d41d8cd98f00b204e9800998ecf8427e
[state] => 3
[date_reg] => 1126179573
)

)

at g2xarusergroupimportexport(xargallery2helper.php:1635)
at gallery2_admin_updateconfig(updateconfig.php:82)

Array
(
[0] => Array
(
)

)

at xarmodfunc(xarMod.php:886)

Array
(
[0] => gallery2
[1] => admin
[2] => updateconfig
)

at xarmain(index.php:93)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-09-17 15:38

hmm, bad.
i'm the author of this integration but since xaraya changed to the new sourcecode management (monotone), i'm unable to track their development versions. and RC3 of xaraya is bugged for PHP 4.4.0. so i was unable to test it for some time.
i expected an RC4 or the final version of xaraya sooner, such that I can test things again, which is really necessary.
i hope to get a dev xaraya version soon to debug this.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Sun, 2005-09-18 05:04

Thanks for the information. Is there anything I can do on my end to help?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-18 13:08

with the help of a xaraya dev i've got the current development version installed on my dev server.
gallery2 and xaraya still work together.
still, there are issues. e.g. the CSS files from g2 can no longer be included automatically without manual steps. i've filed a feature request for xaraya a few months ago, hopefully we'll get this soon fixed.

to your problem: since it should work, and that's good to know :), we have to assume there's something wrong / unexpected in your setup.

what version of xaraya are you running? and what version of G2?
do you have a xaraya user with id '0' or an empty id field in your xar_roles db table?

 
wwalkerbout

Joined: 2005-04-04
Posts: 6
Posted: Sun, 2005-09-18 16:41

Hi,

After posting a message in one of the Xaraya News Groups, because I am really keen to get Gallery2 working in a via the Gallery2 Module for Role integration purposes, I continued to dig into information on this site. Hence my stumbling across this Forum.

If there is anything I can do to get to a stage where the Gallery2 (latest version) integration will work with Xaraya Version 1.0, RC3, I would also be happy to assist where possible.

Alternatively, if you are able to provide me the details of the latest version combinations for Xaraya and Gallery2 which are know to work well together, I guess I could always drop back in version on the Xaraya side. My site has not been deployed yet, so that might be an option. However, ideally if I could get it to work with Xaraya V1, RC3, that would be a huge help, as I have a number of other modules working well within that environment.

Any feedback would be most appreciated.

Cheers,

Wayne

 
wwalkerbout

Joined: 2005-04-04
Posts: 6
Posted: Sun, 2005-09-18 17:09

Hi Valiant,

I thought I'd quickly add the following information after reading your last post in more detail. I my case, I checked the xar_roles table and found no entry with a user id of '0' (xar_uid). Nor did I find any empty id fields in the xar_roles table.

As mentioned, my version combination is Xaraya 1.0 RC3 with Gallery2 (the just released Version 2.0).

To provide more detail, the following is the process I followed and the resulting symptoms:

I installed Gallery2 in the Document Root along with Xaraya. (ie. http://www.domain.com for Xaraya and http://www.domain.com/gallery for
Gallery2). This equates pretty much to the first example settings in the instructions located in the configuration area of the Gallery2 Xaraya
Module, i.e.:

"Example: xaraya is in the Document Root: www.domain.com/index.php. G2 is installed in www.domain.com/gallery/main.php. The relative path would be
"gallery/ or ".gallery/"

Either of these setting gave the same error message, i.e.:

"At: /home/domain/public_html/modules/gallery2/xargallery2helper.php (Line: 805) Undefined index: PATH_TRANSLATED"

The result is I can't get any further with Gallery2 being integrated with Xaraya. When I set the Gallery2 config.php setting back to "$gallery->setConfig('mode.embed.only', false)", Gallery2 works just fine in standalone mode.

I thought I'd add this additional information in case it is helpful in identifying a source of the problem.

Cheers,

Wayne

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-18 17:45

so you don't have $_SERVER['PATH_TRANSLATED']. i'll have to patch the integration code to make it work on your server. but i don't have time to fix this right now.

you can fix your own g2:
open modules/gallery2/xargallery2helper.class
replace $scriptName = preg_replace('|/([^/]+/)*|', '', $_SERVER['PATH_TRANSLATED']);
with
$scriptName = 'index.php';

and replace $g2IncludePath = realpath(dirname($_SERVER['PATH_TRANSLATED']) . '/' . $g2RelativeUrl) . '/';
with
$g2IncludePath = realpath(dirname(dirname(dirname(__FILE__))) . '/' . $g2RelativeUrl) . '/';

 
wwalkerbout

Joined: 2005-04-04
Posts: 6
Posted: Sun, 2005-09-18 20:42

Hi Valiant,

You're da Man! This is brilliant! You have made it so I can continue on and configure Gallery2 within my Xaraya V1 RC3 environment and I can't express fully how much I appreciate that.

Thanks so much for taking the time to list the above fix. I really do appreciate it.

Given that you mentioned earlier you are the author of this integration effort, I really do thank you for the work you have done. It is great! I played with an earlier version and liked what I saw then, so now that Gallery2 is in full release, I am really looking forwward to working with this combination.

Many thanks!

Cheers,

Wayne

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-09-19 00:00

thanks :)

it could be so much more powerful, but i don't really have the time to work on all the synergies that could arise right now.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Mon, 2005-09-19 05:12

Valient,

Thanks for the help. The user with ID 201 looked a little funky so I just deleted it and all seems to be well. The block throws an error though so I am not sure what is going on there. Did blocks work on your install?

I could detect nothing wrong with the other site that I have though, and that is still throwing the same error there. Both sites were upgrades from Postnuke and I wonder if that might have anything to do with it. Does it matter from your perspective if I do the Xaraya (RC3) install, then Gallery install, then PN upgrade? What I did was Xaraya install, PN upgrade, Gallery install and I am beginning to think that is what is causing the problem. Will rebuild the second site and install Gallery first prior to PN upgrade and see if that helps.

Thanks again!

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Mon, 2005-09-19 05:12

Edited, duplicate.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Mon, 2005-09-19 05:13

Edited, duplicate.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Mon, 2005-09-19 05:13

Edited, duplicate.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-09-19 10:53

sabrie,

what error do you get?
is the g2 imageblock module installed AND activated? does it work in g2 standalone?
xaraya install, pn upgrade, then gallery is certainly the right order. since i don't know what the PN upgrade does and if it uses the API for everything. if it accesses the db directly to create users etc. it a) doesn't synchronize with G2 and b) might do incorrect things.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 00:14

I did a fresh install of Xaraya RC3 and Gallery 2 from scratch, both up and running fine. Add Xaraya intergration and install module all good up unitl going to configure the Gallery "Modify Config" in Xaraya. I enter the Relative URL and hit submit and it throws this error:

User Error
BAD_PARAM

xarGetAncestors: could not fetch base role!

When I go back to "Modify Config" it shows the correct Relative URL and Include path, but throws error again when resubmitted. Going to the actuall Gallery link using Xaraya say the module is not configured yet. Hmmmm.....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 00:29

tested the same yesterday, RC3 (++) and g 2.0 release. never had an error during the initial config save / user sync.

don't you get more details for the xarGetAncestors error? i need everything.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 00:45

Nope....thats it. Kind of eerie.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 00:49

Did you have to hack Xaraya to get around the new PHP problem? Wonder if that may be causing the terseness of the error.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 09:23

what php problem? the PHP 4.4.0 "Notices"?
i'm using RC 3 ++, the current development version of xaraya, which solved this issue.
what php version are you using?

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 17:01

I am using PHP 4.4.0 as well...with the latest RC3 package (then downloaded the extra file and set error messages to default). Should I grab the RC3 package from you site?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 17:07

if you want to make xaraya work with PHP 4.4.0, you need to disable xataya's error stuff, that you can do in var/config.system.php . maybe it works not with RC 3 and you need the current development release.

in the config file it should be something like:

/*
 * if you set this to true the core will be able to
 * trap every message that comes  from PHP and if
 * possible to show a gracefully error page.
 * This is an advanced option, leave it to false if unsure.
 * TODO: review this in code, it is known to hide some errors
 * TODO: it also is known to break a PHP5 installation due to the introduction
 *       of E_STRICT error level (see xarException phpErrorHandler function)
 * TODO: move this out of here
 * Set to false for php 4.4 and php > 5.03
 * Temp solution for bug #4785 until function return by reference instances reviewed
 */
$systemConfiguration['Exception.EnablePHPErrorHandler'] = false;
 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 20:00

Must have still been asleep for my earlier post. I meant to say grab the gallery2 build from the your site, which I did. Install was very smooth and Gallery now works, but I get a nice long error when I enable the block. Error is large, would you rather have it posted here or mailed to you?

Thanks for all the help!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 20:31

did you get rid of the PHP 4.4.0 notices?
please upload the debug output / error somewhere on your website and add a link here.

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 22:38

Error file is at http://www.sabrie.com/error.txt and the actual site currently has the block loaded on the right side of the page.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 22:41

ERROR_CONFIGURATION_REQUIRED -> you need to activate the G2 imageblock module!
G2: site admin -> modules -> activate image block.

so the xaraya gallery2 module configuration worked?

 
sabrie

Joined: 2005-09-17
Posts: 17
Posted: Tue, 2005-09-20 23:26

That fixed it. I was adding the block in Xaraya figuring it was already installed.

Yes, everything is working, thanks for all your help!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 23:53

btw: i released yesterday 0.6.11 of the integration, which includes the G2 theme.css again in xaraya. but with the current xaraya API, i couldn't include other styles, e.g. the imageframes are lost in xaraya, colorpacks too.

 
wwalkerbout

Joined: 2005-04-04
Posts: 6
Posted: Tue, 2005-09-20 23:54

Hi Valiant,

Thanks for your feedback to my last post. I am impressed already regarding the posibilities of the Gallery2 integration with Xaraya. I am looking forward to when you are able to find time to work on those other "synergies that could arise".

I am currently building a "Community Site" for a friend who supports the sport "Ultimate Frisbee" in the Los Angeles area. It is my first real community site, so since getting the Gallery2 integration to work after your assistance, aside from bedding that integration down, I have been hard at work on all the other community related modules that are available through Xaraya.

Now my final task is to work on the "look and feel" piece of the Gallery2 integration. I understand that I'll have to do the Theme modifications to match my Xaraya "look and feel", via the Gallery2 Smarty templating. However, before I do any of that, I notice that while all the Gallery2 functionality appears to be operational within my Xaraya instance, the Gallery2 Stylesheets seem to be ignored.

Is there a setting that I should be aware of that will ensure that the Gallery2 stylesheets are used?

Again, any support you are able to provide would be most welcomed.

Cheers,

Wayne

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-09-21 00:19

heh, funny, mindless and bharat, the two lead developers of G2, are both ultimate players for a very long time now :)

as to the g2 stylesheets, read my last post in this thread. Posted: Wed, 2005-09-21 01:53

 
wwalkerbout

Joined: 2005-04-04
Posts: 6
Posted: Wed, 2005-09-21 00:47

Hi Valiant,

Wow! Thanks very much for the prompt response to my posting. I read through those other messages in the thread and missed that one, somehow.

Can you tell me where I can download that version. Where I got my last integration package (at: http://galleryupdates.jpmullan.com/#integrations), the changelog seemed to indicate that this was not the latest.

I didn't know that about the lead G2 developers. Ultimate Frisbee is a great sport. I've played it for a number of years, so working on this site gives me a bit more incentive to get back into it again after being way too idle of late.

Thanks again for the prompt reply.

Cheers,

Wayne

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-09-21 13:21

09-19-2005 04:00:23 AM is the timestamp of the xaraya integration download. that's too old. maybe wait another day, i don't know how often this is supposed to update. i thought it was daily.
else: use cvs...
see the cvs link on the sf.net/projects/gallery/ website and the cvs module in question is "integreation"

 
wwalkerbout

Joined: 2005-04-04
Posts: 6
Posted: Wed, 2005-09-21 14:40

Thanks Valiant.

I should have thought of the CVS option. Xaraya uses Monotone, so I didn't have CVS set up. I'll go ahead and set that up to get the letest. Many thanks.

Cheers,

Wayne

 
cokeman

Joined: 2003-05-15
Posts: 11
Posted: Thu, 2005-10-06 10:39

Hi Valiant,

I have just installed xaraya today, and want it to work with my gallery, but I get an error, when trying to "Update configuration"

Here is the error output:

Quote:
Error during synchronization. Error during Flush G2 filesystem cache. Here is the rror from G2: <br /> [Error (ERROR_BAD_PATH)<ul><li><b>in</b> C:\WWW\cokeman.dk\X\modules\gallery2\xargallery2helper.php <b>at line</b> 1296 (GalleryStatus::error) <li><b>in</b> C:\WWW\cokeman.dk\X\modules\gallery2\xaradmin\updateconfig.php <b>at line</b> 82 (xarGallery2Helper::g2xarUserGroupImportExport) <li><b>in</b> C:\WWW\cokeman.dk\X\includes\xarMod.php <b>at line</b> 886<li><b>in</b> C:\WWW\cokeman.dk\X\index.php <b>at line</b> 93<li><b>in</b> C:\WWW\cokeman.dk\X\index.php <b>at line</b> 161</ul>]

Explanation:
Funktionen blev udført korrekt, men resultatet var en fejl.

Stack:
at g2xarUserGroupImportExport(xargallery2helper.php:1298)
at gallery2_admin_updateconfig(updateconfig.php:82)

Array
(
[0] => Array
(
)

)

at xarModFunc(xarMod.php:886)

Array
(
[0] => gallery2
[1] => admin
[2] => updateconfig
)

at xarMain(index.php:93)

Click here to raise a bug

Please help

- Cokeman