Applet upload in embedded Gallery fails

paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-07-08 01:19

The applet upload is supposed to work when Gallery 1.4.4 (latest beta) is embedded in:

    phpNuke
    postNuke
    Geeklog

I need help with the other CMS systems. If you use Gallery in a CMS that's not yet supported, please PM me a test account on your CMS. I would also very much appreciate a pointer to how that particular CMS handles session cookies.[/]

 
Desmond

Joined: 2004-07-06
Posts: 19
Posted: Thu, 2004-07-08 04:40

I think I have to config something before you can try the 1.4.4 in my phpbb2 embeddment........ tell me what to do

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-07-08 04:47

Really? Can you not just create a user account in phpBB2 for me?

 
Desmond

Joined: 2004-07-06
Posts: 19
Posted: Thu, 2004-07-08 09:58

you are admin now........

 
Desmond

Joined: 2004-07-06
Posts: 19
Posted: Thu, 2004-07-08 14:55

please tell me if you still need this account.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Thu, 2004-07-08 21:30

http://pgroove.com/t_i_p/modules.php?op=modload&name=gallery&file=index&sid=fba66e883aa7eb6f969c1e770a64e4a5

that is my gallery embedded inside phpbb2, what kind of priveleges do you need?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-07-08 21:45

Desmond, M.D., thanks for the test accounts! Can you test that adding these lines to util.php, in method drawApplet, at the end of the statement that handles CMS-specific overrides (line 1211 in the latest CVS) enables phpBB2 support for the applets:

		} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpBB2') {
			$cookie_name = 'phpbb2mysql_sid';
			$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];

If it does, I'll commit the fix before 1.4.4-RC1.

(code updated)

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Fri, 2004-07-09 00:44

i don't think it worked completely. It uploads the photo (status bar moves to 100%), it says upload successful in the popup, but then the same error dialog pops up.

Quote:
// handle CMS-specific overrides
if (isset($GALLERY_EMBEDDED_INSIDE)) {
if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpnuke') {
$cookie_name = 'user';
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'GeekLog') {
$cookie_name = $_CONF['cookie_session'];
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpBB2') {
$cookie_name = $_CONF['phpbb2mysql_sid'];
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
}
}

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Fri, 2004-07-09 01:24

My bad, the code was wrong. I've fixed it in the previous post (remove $_CONF[]).

Can you test again?

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Fri, 2004-07-09 01:55

The same thing happened with that change.

Quote:
// handle CMS-specific overrides
if (isset($GALLERY_EMBEDDED_INSIDE)) {
if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpnuke') {
$cookie_name = 'user';
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'GeekLog') {
$cookie_name = $_CONF['cookie_session'];
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpBB2') {
$cookie_name = 'phpbb2mysql_sid';
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
}
}

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Fri, 2004-07-09 02:10

OK, I'll probably have to update the applet. Will you be able to deploy it?

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Fri, 2004-07-09 02:18

I'm not sure what that requires. Do I just have to drop the new jar files in the java directory?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Fri, 2004-07-09 02:24

Yep.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Fri, 2004-07-09 02:44

I can do that. Let me know where I can get the file after you finish.

Thanks for all your help in this, it is definitely appreciated.

 
Haplo
Haplo's picture

Joined: 2004-03-29
Posts: 82
Posted: Sat, 2004-07-10 10:09

has there been any "official" fix for this for v. 1.4.3 pl2 - phpbb ?

some of the reason for usig gallery is its great upload aplets...so when not working you get a bit disapointed ;)

im not interested in using latest cvs or similar, a small session/cookie fix would be appreciated!

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Sat, 2004-07-10 15:51

Haplo, I understand how you would want that. Unfortunately, we only back-port security fix, not general bugs/features. It's too much work and we'd rather release early/release often than spend time maintaining already released version. However, 1.4.4-RC1 should be released today with all the fixes.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Sun, 2004-07-11 16:28

Was the phpbb2 problem fixed in this release? I still get the same error.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-07-12 15:31

M.D., it wasn't, the last change didn't make the cut. Can you try to modify the code (remove the $_CONF[] in drawApplet)?

 
doliam

Joined: 2004-06-24
Posts: 7
Posted: Mon, 2004-07-12 17:28

same issue with the following code:
i get the error, 'user can not add to album' after the status bar popup says 'Added Image Successfully'

Quote:
// handle CMS-specific overrides
if (isset($GALLERY_EMBEDDED_INSIDE)) {
if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpnuke') {
$cookie_name = 'user';
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'GeekLog') {
$cookie_name = $_CONF['cookie_session'];
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
} else if ($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpBB2') {
$cookie_name = 'phpbb2mysql_sid';
$cookie_value = $HTTP_COOKIE_VARS[$cookie_name];
}
}

 
doliam

Joined: 2004-06-24
Posts: 7
Posted: Mon, 2004-07-12 19:16

Well doliam = MD = doliam. I didn't even realize I had 2 names registered. my password to MD must be in my home email, cuz i can't remember it. I guess i had registered a name here at work, anyways... MD and doliam are one in the same.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-07-12 20:31

OK, now another problem: phpBB2 sets the cookie for the entire domain, not just the right host. I'll make a new build of the applet for you to test.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-07-12 20:37

Actually, this may be a separate problem. Can you try testing with the full URL (www.pgroove.com instead of pgroove.com): http://www.pgroove.com/t_i_p/modules.php?mode=applet&set_albumName=&op=modload&name=gallery&file=index&include=slideshow.php

 
doliam

Joined: 2004-06-24
Posts: 7
Posted: Mon, 2004-07-12 21:01

I get the same problem when adding the www before pgroove.com

Do you want me to give you admin access or anything within my gallery?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-07-12 21:07

Yes, please. So far I've been testing using the slideshow, because the cookies were getting set incorrectly anyway, but now that they appear to be set correctly, I have to dig deeper.

I created user 'paour'; can you create an album I can upload into and give me write permissions for that album?

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Mon, 2004-07-12 22:30

ok, in the Upload Album (#4), there is an album called paour in there. i made u owner and gave u full permissions.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-07-13 04:46

M.D., I don't see a 'paour' album inside 'Upload', just 'Will D.'

 
doliam

Joined: 2004-06-24
Posts: 7
Posted: Tue, 2004-07-13 13:32

Try now. I also gave you access to upload directly to the Upload Album if you can't see it. Very strange, I made you owner and gave you full permissions to it.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Wed, 2004-07-14 21:24

did that work for you? I'm begining to think that there might be a problem with the permissions. Maybe I am missing something small. But, I made you owner of the album and gave u every permission inside the album. I guess that is redundant, but i figured better safe than sorry. Anyways, let me know if it's still not working, i can give u the test account I use.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-07-20 20:00

I've committed G 1.4.4-RC3-b4, which fixes the applets when embedded in phpBB2 (it works with my version of phpBB 2.0.10).

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Fri, 2004-07-23 18:58

Where can I download this from? Is it in the latest CVS release? I download 1.4.5 from Jesse Mullen's download page and it didn't work. But, I am running phpbb2 v2.04, so that might be the problem

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-07-26 16:10

I've tested with 2.0.10 only. What is the problem on your site?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-07-26 16:11

And it is supposed to be in 1.4.5 betas since this weekend.

 
doliam

Joined: 2004-06-24
Posts: 7
Posted: Mon, 2004-07-26 19:44

ok. I downloaded the latest release for Friday, maybe it wasn't put in until saturday or sunday. If that doesn't work, i'll upgrade phpbb2. Thanks!

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Mon, 2004-08-02 02:42

I get the same error. User Can Not Add to Album
I have the latest Gallery and latest PhpBB2 installed:
Gallery v1.4.5-cvs-b81
phpBB 2.0.10

is the fix incorporated in that release of Gallery?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-08-02 03:05

Yep. What's your URL again? Or can you attach the log?

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Mon, 2004-08-02 15:45

http://www.pgroove.com/t_i_p

click the gallery link up at the top.

I'll see if I can dig up some logs.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-08-02 18:28

Damn, you're right, the integration is broken in 1.4.5. I've fixed it in b83, sorry about that.

Also remember that cookies are sent incorrectly if the URL is missing the www.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Mon, 2004-08-02 19:20

ok. Should I wait for another release or can i get b83 from somewhere?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2004-08-02 20:23

You can download it from the nightlies tomorrow.

 
neutcomp
neutcomp's picture

Joined: 2004-07-28
Posts: 28
Posted: Wed, 2004-08-04 20:30

Oke I have the same problem, so I also wanted to update the java applet if there is a bugfix.

So thats why I post my message here.
http://www.sc-muiden.nl/gallery

Thanxx
Bjorn

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Wed, 2004-08-04 23:38

It still isn't working for me.

these are my versions:
Powered by Gallery v1.4.5-cvs-b89
Powered by phpBB 2.0.10

Gallery URL:
http://pgroove.com/t_i_p/modules.php?op=modload&name=gallery&file=index

I get an error on the form upload now too, I wonder if I have problems in my gallery settings.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2004-08-04 23:42

M.D., try with www.pgroove.com, I think it should work.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Thu, 2004-08-05 01:17

I used the full url and i got a new error msg, screenshot is here:

http://www.phatgrooves.org/images/gallery_error.gif

I thought cookies only used the domain, ie) pgroove.com and prefixes did not matter? At work we set a login cookie to be .ge.com and it works for *.ge.com. Is the cookie set differently in gallery or phpbb2? Anyways, just curious.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Thu, 2004-08-05 01:59
 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-08-05 17:52

M.D., the new error is good news... I think it's due to a Gallery configuration error. Can you upload files using the Form mode when Gallery is embedded in phpBB2?

Take a look at the Java log in your browser, you'll see it's probably due to Gallery not finding the file you uploaded, but the session info is correct.

Regarding the cookie domain settings and tail matching, PHP doesn't help much, and yes, I should try to do it in Java.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Thu, 2004-08-05 18:05

I can't upload using the Form when the gallery is embedded in phpBB2, here is the error I get:

Processing status...
- Adding blank.gif
Warning: Unable to open 'Array' for reading: No such file or directory in /home/wilson/pgroove-www/gallery/platform/fs_unix.php on line 26

Resizing/compressing original image
Warning: getimagesize: Unable to open '/home/wilson/pgroove-www/albums/Upload/blank.gif' for reading. in /home/wilson/pgroove-www/gallery/util.php on line 490

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-08-05 18:07

Great. That means now you need to go over to the Troubleshooting forum to solve this problem, which is independant of the upload applet and GR. Once it is solved, I'm pretty sure the upload applet will work. Good luck and thanks for sticking with me.

 
pethoek

Joined: 2004-08-10
Posts: 5
Posted: Tue, 2004-08-10 20:07

I'm using PHP-Nuke 7.3 and logged in as an admin.

I can't upload any pictures or zip files using the applet since I upgraded from 1.4.3 to 1.4.4 or even 1.4.5-cvs-b96

With the form it's no problem at all.

The message is: Upload error: User cannot add to album

The JAVA Console gives this messages:

debug_album=vijgezel_fotos
debug_gallery_version=1.4.5-cvs-b96
debug_user=EVERYBODY
debug_user_type=everybodyuser
debug_user_already_logged_in=
status=401
status_text=User cannot add to album.

32817|INFO |GalComm2 |Upload error: User cannot add to album.

Applet stop

Does anybody know what to do??

Thanx in advance,

Pethoek

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Tue, 2004-08-10 20:07

the people over in the Troubleshooting forum had me download a new copy of modules.php... I am now getting the same, User Can Not Add to Album error as before.

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Mon, 2004-08-23 19:28

any suggestions?

 
M.D.

Joined: 2004-06-21
Posts: 38
Posted: Tue, 2004-09-21 14:37

has anyone gotten the phpbb2 and gallery integration to work? I'm still getting a 'User Can Not Add to Album' error when I try to upload. I guess i'll try to install the latest version of gallery tonight.

thanks for any help in advance!!