Advanced search  

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

Pages: [1]   Go Down

Author Topic: Re: Xoops bridging error & fix  (Read 13089 times)

0 Members and 1 Guest are viewing this topic.

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« on: July 14, 2005, 12:02:20 am »

The error I get is

Code: [Select]
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
« Last Edit: August 09, 2005, 03:21:00 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Xoops bridging error & fix
« Reply #1 on: July 14, 2005, 12:19:57 am »

Can you replace the get_groups method with this one:

Code: [Select]
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]);
}
« Last Edit: July 14, 2005, 12:40:46 am by Nibbler »
Logged

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« Reply #2 on: July 14, 2005, 01:45:03 am »

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
Logged

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« Reply #3 on: July 14, 2005, 07:21:59 am »

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.
Logged

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« Reply #4 on: July 14, 2005, 07:38:04 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Xoops bridging error & fix
« Reply #5 on: July 14, 2005, 09:29:39 am »

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

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« Reply #6 on: July 15, 2005, 02:32:45 am »

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
Logged

Nibbler

  • Guest
Re: Re: Xoops bridging error & fix
« Reply #7 on: July 15, 2005, 02:34:01 am »

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

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« Reply #8 on: July 15, 2005, 03:02:10 am »

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
Logged

finnerss

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Xoops bridging error & fix
« Reply #9 on: July 15, 2005, 04:55:05 am »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Xoops bridging error & fix
« Reply #10 on: July 15, 2005, 09:05:13 am »

please post your edits
Logged

Nibbler

  • Guest
Re: Re: Xoops bridging error & fix
« Reply #11 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

Code: [Select]
define('XOOPS_CHECK_PATH', '1');
to

Code: [Select]
define('XOOPS_CHECK_PATH', '0');
I will keep an eye open for a better solution.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Xoops bridging error & fix
« Reply #12 on: August 09, 2005, 09:10:10 am »

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

Nibbler

  • Guest
Re: Re: Xoops bridging error & fix
« Reply #13 on: August 09, 2005, 03:19:50 pm »

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

mikelmoore

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Re: Xoops bridging error & fix
« Reply #14 on: April 10, 2006, 04:53:21 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

Code: [Select]
define('XOOPS_CHECK_PATH', '1');
to

Code: [Select]
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!
Code: [Select]
// 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:
Code: [Select]
exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");

3:Replace it with this:
Code: [Select]

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.");
}
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.