Re: Xoops bridging error & fix Re: Xoops bridging error & fix
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Re: Xoops bridging error & fix

Started by finnerss, July 14, 2005, 12:02:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

finnerss

The error I get is

Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /home/gplegacy/public_html/coppermine/bridge/xoops.inc.php on line 104


right after enabling bridging with Xoops 2

Now the gallery doesn't show up, let alone any config options to disable bridging or revert :(

I tried the options said in here, including a check-up of the xoops/mainfile.php location, and the bridgemanager set to 0 but still no luck.

I had no other mods installed, but had set categories, albums, usergroups, users, in the coppermine standalone install, everything was working great.

Please help me if you can :D

Best wishes

Sergio

Nibbler

#1
Can you replace the get_groups method with this one:

function get_groups($row)
{
if ($this->use_post_based_groups){
//$groups = $_SESSION['xoopsUserGroups'];
//foreach ($groups as $a => &$b) $b += 100;
$groups = array();
foreach ($_SESSION['xoopsUserGroups'] as $a => $b) $groups[$a] = $b + 100;
return $groups;
}
return array($_SESSION['xoopsUserGroups'][0]);
}

finnerss

getting a weird behavior by the forum, I posted a reply but it doesn't show up. Hope this one does.

Thanks for the quick reply :) unfortunately now I get this error after adding the code

XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run

Do I have to copy the directory I had for the standalone xoops, with the bridging and all, to my Xoops main directory?

Thanks

finnerss

Sorry to post again but I have found no way to get a little help, I've managed to get Coppermine integrated with Xoops, but I think I did select the Post_User_groups or something like that when I ran the bridging wizard, now I can't get into the Admin :( therefore I really can't do anything with the gallery.

Any help with how to get Admin back? In xoops and coppermine I used the same login, same username and same password but it's been of no use, it says I don't have authorization for the admin site :(

Thanks, any help will be greatly appreciated.

finnerss

again, sorry :S got it working, I think not integrated with Xoops, but it seems to be working

Joachim Müller

please post a link to your site and a non-admin test user account.

finnerss

Thanks GauGau.

Website : www.gplegacy.com
Coppermine location : www.gplegacy.com/antartida/coppermine

(antartida is the Xoops directory)

username : copper
password : coppertest (or testcopper if you want to try it and it doesn't work, just forgot the pwd :S)


Thanks in advance, my new problem is that I can't add groups, when I add them to xoops, I still can't see them in Coppermine (I didn't use the post_user something setting, so now I can't have people who help me out with the site upload pictures to albums I select.

Any way to directly insert new groups to the code or the database? I'm not sure how that's done :(

thanks a million in advance.

Sergio

Nibbler

If you want to use the groups from xoops then you need to enabld post based groups. That's what that option is for.

finnerss

Thanks Nibbler! :D

Yet that's what broke my gallery down the last time :( I had to reinstall everything because I couldn't log in as admin even if my username and password were the same in both. I don't mind Copermine not having the same usergroups as Xoops, but I would like to be able to create new groups in Coppermine, or at least add permissions to existing groups, it doesn't allow me, and it only tells me "this group has no special access"

Hope you can help me with this :) I've seen all your posts and you're great. Same with GauGau, so I'm relying big time on you :D

Sergio

finnerss

Edited the init.php file in the include folders and the groupmgr.php file in CP root. Seems to be working now with post based groups.

Thanks

Sergio

Joachim Müller


Nibbler

Committed fix for parse error.

Xoops now has a path check built into their mainfile.php which prevents it being included by scripts outside xoops. You will need to disable that in order to use the bridge.

mainfile.php

define('XOOPS_CHECK_PATH', '1');

to

define('XOOPS_CHECK_PATH', '0');

I will keep an eye open for a better solution.

Joachim Müller

can this thread be marked as "fixed" or should it be tagged as "known issue"?

Nibbler

I'll tag it as fixed and add a note into the docs.

mikelmoore

Quote from: Nibbler on July 28, 2005, 11:35:41 PM
Committed fix for parse error.

Xoops now has a path check built into their mainfile.php which prevents it being included by scripts outside xoops. You will need to disable that in order to use the bridge.

mainfile.php

define('XOOPS_CHECK_PATH', '1');

to

define('XOOPS_CHECK_PATH', '0');

I will keep an eye open for a better solution.

Here's a more secure way to handle this:

1. add the following before the define('XOOPS_CHECK_PATH', '1') and leave XOOPS_CHECK_PATH setting at 1, so XOOPS is more secure!

// Coppermine Physical Path
// Physical path to your main COPPERMINE directory WITHOUT trailing slash
// Example: define('XOOPS_COPPERMINE_PATH', '/srv/www/htdocs/coppermine');
define('XOOPS_COPPERMINE_PATH', 'replace/this/with/physical/path/to/coppermine');


2. Locate this line:

exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");


3:Replace it with this:


if (strcasecmp( substr($xoopsScriptPath, 0, strlen(XOOPS_COPPERMINE_PATH)), str_replace( DIRECTORY_SEPARATOR, '/', XOOPS_COPPERMINE_PATH))) {
exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
}