Embedding in phpBB 2.0.9?

AlpineZone
AlpineZone's picture

Joined: 2004-01-21
Posts: 69
Posted: Tue, 2004-07-13 16:08

phpBB 2.0.9 was just released. I haven't had any luck embedding my Gallery into it. Has anyone else encountered any problems?

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Tue, 2004-07-13 16:27

It's not working.
I've just upgraded my 2.0.8 installation to 2.0.9 and the Gallery installation has stopped working.

It looked as though the filename wasn't being passed through to modules.php correctly, so I tried hardcoding it and it just took me to the Gallery installation without the embedding.

A problem with sessions maybe? I think that's one of the things that has changed in the new release.

John

 
AlpineZone
AlpineZone's picture

Joined: 2004-01-21
Posts: 69
Posted: Tue, 2004-07-13 19:43

I saw the same thing, John. I'm glad I'm not the only one...

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Tue, 2004-07-13 20:22

I've been doing a bit of poking around.

It seems that one of the updates is associated with the register_globals setting for php. The updates done to common.php are the culprits:

//
function unset_vars(&$var)
{
	while (list($var_name, $null) = @each($var))
	{
		unset($GLOBALS[$var_name]);
	}
	return;
}

and

$ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var';

// Unset globally registered vars - PHP5 ... hhmmm
if (@$ini_val('register_globals') == '1' || strtolower(@$ini_val('register_globals')) == 'on')
{
	$var_prefix = 'HTTP';
	$var_suffix = '_VARS';
	
	$test = array('_GET', '_POST', '_SERVER', '_COOKIE', '_ENV');

	foreach ($test as $var)
	{
		if (is_array(${$var_prefix . $var . $var_suffix}))
		{
			unset_vars(${$var_prefix . $var . $var_suffix});
		}

		if (is_array(${$var}))
		{
			unset_vars(${$var});
		}
	}

	if (is_array(${'_FILES'}))
	{
		unset_vars(${'_FILES'});
	}

	if (is_array(${'HTTP_POST_FILES'}))
	{
		unset_vars(${'HTTP_POST_FILES'});
	}
}

I'm a relative newcomer to php so I don't really understand the purpose of this update, but it is clear that it is clearing out the http vars when common.php is included in modules.php

Any suggestions for getting round this problem?
Does it need a a different "version" of common.php for modules.php or can there be some sort of switch in common.php that doesn't clear the vars if it is being included from modules.php?

Thanks,
John

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Tue, 2004-07-13 20:35

I just downloaded 2.0.9, and I'll be investigating a fix. If possible, this will make it into 1.4.4, since maintaining embedding is very important. If it's not, we may release a patch sometime after 1.4.4.

 
Checkmate
Checkmate's picture

Joined: 2004-02-24
Posts: 29
Posted: Tue, 2004-07-13 20:37

I have exactly the same problem. And indeed the "common.php" seems to be the problem. I just replaced the new version (1.74.2.12) with the old version (1.74.2.10) and my embedded gallery works again.

Of course not the nicest method, but until some better PHP programmer than me finds a fix, this works just fine for me :P

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Tue, 2004-07-13 21:02

As a crude fix, I commented out the line:
unset($GLOBALS[$var_name]);
but this, of course, completely bypasses the functionality of the mod.

Signe,
Thanks for looking at this. I look forward to getting a working embedded 1.4.4

John

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2004-07-14 00:14

Hello,

i made a modified modules.php

Download it from: http://www.jems.de/archive/1.4.5/modules.php.gz

Tell me, if this works.

Regards,

Jens

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Wed, 2004-07-14 08:03
Tim_j wrote:
Tell me, if this works.

Regards,

Jens

It is better. I can now see the albums correctly embedded, but I get an error when I try to view individual pictures:

Error: Requested index [0] out of bounds [20]
Fatal error: Call to a member function on a non-object in /home/mywebsite/public_html/modules/classes/Album.php on line 1246

John

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Wed, 2004-07-14 08:56

Sorted.
I included 'id' in your array declaration.

Just curious (and this is my lack of php knowledge coming out), but why does it not seem to need 'full' and 'set_albumName' declared as well?

John

 
AlpineZone
AlpineZone's picture

Joined: 2004-01-21
Posts: 69
Posted: Wed, 2004-07-14 12:45
 
jko

Joined: 2004-04-22
Posts: 34
Posted: Wed, 2004-07-14 13:40
AlpineZone wrote:
Is this at all related?

http://www.phpbb.com/phpBB/viewtopic.php?t=210139

Only in the sense that it is this code that is causing the problem for embedded galleries. The "fix" does nothing to solve the issue with an embedded Gallery though (I tried).

I'm afraid I don't know eough about php to suggest the reason for the modification in the first place.

John

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2004-07-14 19:41

Hi,

i had gone a little deeper. My solution is kinda shit.
I will investigate in a better solution.

Sorry and regards,

Jens

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2004-07-14 20:11

I updated the file.

Can you try http://www.jems.de/archive/1.4.5/modules.php.gz

again ?

Jens

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Wed, 2004-07-14 20:51

I would, but the link seems to be dead.

john

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2004-07-15 09:52

thanks !

fixed.

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Thu, 2004-07-15 10:03

The updated file works.

Thank you.

John

 
cl0ne

Joined: 2004-06-01
Posts: 3
Posted: Thu, 2004-07-22 00:56
Tim_j wrote:
I updated the file.

Can you try http://www.jems.de/archive/1.4.5/modules.php.gz

again ?

Jens

Hi,
I would like that file too. Could you please make it available again?
Thanks
-cl0ne

 
BlossomPink
BlossomPink's picture

Joined: 2004-07-29
Posts: 3
Posted: Thu, 2004-07-29 12:01

I too would like a copy of that file if possible. I have used the comment out a line for now but the file is probably the better option.

Thanks
Denise

 
AlpineZone
AlpineZone's picture

Joined: 2004-01-21
Posts: 69
Posted: Thu, 2004-07-29 12:05

phpBB 2.0.10 and Gallery 1.4.4-RC3 are fully compatible now.

 
BlossomPink
BlossomPink's picture

Joined: 2004-07-29
Posts: 3
Posted: Thu, 2004-07-29 12:22
AlpineZone wrote:
phpBB 2.0.10 and Gallery 1.4.4-RC3 are fully compatible now.

Hi

That's odd I was getting the following error:

Warning: main(./modules//.php): failed to open stream: No such file or directory in /homepages/8/d30493702/htdocs/dollshouseboutique/scripts/phpBB2/modules.php on line 75 

Warning: main(): Failed opening './modules//.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/8/d30493702/htdocs/dollshouseboutique/scripts/phpBB2/modules.php on line 75

So I followed the suggestions above and applied:

As a crude fix, I commented out the line: 
Code: 
unset($GLOBALS[$var_name]); 

This has fixed my error. Should I uncomment it and find a different way of solving my initial error please?

BlossomPink

 
fatwillie
fatwillie's picture

Joined: 2003-02-08
Posts: 5
Posted: Mon, 2004-08-02 19:48

I am usinf phpbb2.0.10 and cannot get the embedded gallery to work either...

Will there be a patch soon?

 
Andrew86

Joined: 2004-08-03
Posts: 4
Posted: Tue, 2004-08-03 02:48
AlpineZone wrote:
phpBB 2.0.10 and Gallery 1.4.4-RC3 are fully compatible now.

Where do I get RC3?
All I see at the SF download page is 1.4.4

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Tue, 2004-08-03 03:18

1.4.4 is newer than 1.4.4-RC3.

 
Andrew86

Joined: 2004-08-03
Posts: 4
Posted: Tue, 2004-08-03 03:32

ok thx
Although I'm still having the upload problem with phpbb2
My thread was posted in the trouble shooting forum. Should probably be in this forum
Feel free to move it if you wish
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=19260

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Tue, 2004-08-03 07:06

I've located the upload issue. Download this modules.php and try again.

 
jko

Joined: 2004-04-22
Posts: 34
Posted: Tue, 2004-08-03 14:27

New modules.php file works for me.

John

 
fatwillie
fatwillie's picture

Joined: 2003-02-08
Posts: 5
Posted: Thu, 2004-08-05 04:29

I am using phpbb 2.0.10 and gallery 1.4.4 and the embeeding does not work.

My forum folder is mtw and I installery in mtw/gallery

In the gallery config I chose phpbb2

http://www.mortystwistedworld.com/mtw/gallery/

That was the result I got.

Can I get a little help here...

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Thu, 2004-08-05 05:29

You need to read the instructions in the contrib/phpBB2 folder.

 
ewerx

Joined: 2004-02-03
Posts: 14
Posted: Thu, 2004-08-19 23:52
signe wrote:
I've located the upload issue. Download this modules.php and try again.

Can you please make this file available again?

I upgraded phpBB from 2.0.8 to 2.0.10 and now when I try to enter my gallery I get the following:

Warning: Failed opening './modules//.php' for inclusion (include_path='./m2f/includes/pear/:.:/usr/share/pear') in /var/www/ewerx/data/forums/modules.php on line 55

 
ewerx

Joined: 2004-02-03
Posts: 14
Posted: Fri, 2004-08-20 00:13

Okay so I did the "hack" mentioned in this thread, where I comment out the unset(...) in common.php. This got rid of that error I mentioned above and let me enter the gallery, but now upload doesn't work ("User cannot add to this album")...

I assume I still need the updated version of modules.php to fix this? Can someone please post it?

 
AlpineZone
AlpineZone's picture

Joined: 2004-01-21
Posts: 69
Posted: Fri, 2004-08-20 00:42

Check the CVS

 
ewerx

Joined: 2004-02-03
Posts: 14
Posted: Fri, 2004-08-20 01:51

CVS wasn't working but I found one of the 1.4.5-dev versions from the URLs posted before in this thread. After I replaced the modules.php from that one it was working again. Thanks.

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Fri, 2004-11-12 23:05

I know this is an old thread, but I'm having trouble with this.

I applied the patches by hand from CVS and added the modules.php file from there (the patch wouldn't apply with patch). I think I've got the patches in, but it still doesn't work. I'm using phpBB2.0.10 and Gallery 1.4.4:

http://forums.donniebarnes.com
http://gallery.donniebarnes.com

As you can see, the forums work and the Gallery works. But when you click Gallery from the forum page, you get nothing but white. No idea how to debug from there.

--Donnie

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Fri, 2004-11-12 23:07

From the error log:

[client 216.166.211.66] PHP Warning: main(./modules//.php): failed to open stream: No such file or directory in /home/djb/forums/modules.php on line 59, referer: http://forums.donniebarnes.com/index.php
[client 216.166.211.66] PHP Warning: main(): Failed opening './modules//.php' for inclusion (include_path='.:/usr/share/pear') in /home/djb/forums/modules.php on line 59, referer: http://forums.donniebarnes.com/index.php

Not sure where the ./modules//.php part is coming from, exactly...hmmph.

--Donnie

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Fri, 2004-11-12 23:38

djb_rh, 1.4.4-pl3 is completely compatible with phpBB 2.0.10, so there is absolutely nothing that you should need from CVS to install.

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Sat, 2004-11-13 03:51

Hmm, I'm confused. The patches from CVS I'm talking about apply to phpBB2, not Gallery. I see now that Gallery has an embedding config option for phpBB2, which I just enabled. But the real trick is I want phpBB2 logins to work with Gallery. Seems like I'm gonna need to do more than just tell Gallery to embed in phpBB2, and I don't see any config option in phpBB2.

Obviously I'm missing something here. :-) Like I'm expecting too much or something.

--Donnie

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Sat, 2004-11-13 04:04

Oh, and I'm still getting the errors I posted above and no embedded gallery. I've also tried commenting out the "unset GLOBALS" line in common.php to no avail.

--Donnie

 
djb_rh

Joined: 2003-01-28
Posts: 15
Posted: Fri, 2004-11-19 03:00

Okay, never got it to work. What I did do was just hack modules.php to make the call directly to my gallery page instead of using the $ variables. Grotesque hack, but it works and I don't currently have any plans for any *other* modules, so this should work fine. Still seems wrong, but for whatever reason those variables just weren't getting passed into modules.php. *shrug*

--Donnie