Upload fails with applet, but okay with form

Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Sun, 2004-04-25 10:48

This is possibly related to a problem I also have that the main Gallery Remote (v1.3.2) won't connect (logged in the Gallery Remote forum), but the new upload applet will not upload pictures no matter who I am logged in as (Admin or user). It goes through the uploading of the file then fails saying that the user cannot upload pictures to this album. debug mode fails to reveal any more that I can see and there are no messages in PHP.LOG

If I switch to the form I can upload as before with Gallery v1.4.2

----
Gallery URL (optional but very useful):
Gallery version: 1.4.3 (embedded in PostNuke)
Apache version: n/a (using IIS-6)
PHP version (don't just say PHP 4, please): 4.3.6
Graphics Toolkit: ImageMagick
Operating system: Windows 2003
Web browser/version (if applicable): Firefox 0.8

 
Verbal

Joined: 2004-04-26
Posts: 8
Posted: Mon, 2004-04-26 04:54

Same problem. Exactly the same. Gallery 1.4.3 embedded in PostNuke .726 Phoenix. The only difference is that mine says "User cannot add photos to this album", as opposed to "upload". I suspect that's what you meant, Taomyn.

I'd really like to use this feature because I love the idea of a progress bar (I upload a fair number of relatively large videos to my Gallery).

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Mon, 2004-04-26 06:10

Verbal yes you are correct, I meant "add", and likewise, now that I have upgraded to an 8M pixel camera, my uploads are somewhat larger so the progress meter is great :D

I think Gallery Remote in full and mini format are both broken under PostNuke - I wish I could have had time to try out the beta and RC's then hopefully this may have been caught before release.

 
Verbal

Joined: 2004-04-26
Posts: 8
Posted: Mon, 2004-04-26 06:14

That seems to be the case....Gallery Remote has failed to work with my Postnuke install in every release. I was hoping that maybe the configuration wizard would solve that problem, as there is a drop-down box for choosing several CMS systems in which Gallery can be embedded.

 
Verbal

Joined: 2004-04-26
Posts: 8
Posted: Tue, 2004-04-27 03:15

No comments/suggestions?

 
tuxxx

Joined: 2004-04-27
Posts: 13
Posted: Tue, 2004-04-27 11:36

yes,
same problem for me...
im running gallery 1.4.3 final (very great program!!!) in a postnuke environment. adding photos to an album with the form works well (as it did in earlier versions). but using the new java-aplett gives me an error: "Upload error: User cannot add to album." no matter what account i am using (admin, user) the error repeats!
BUT: the first file i wanted to upload with this aplett (lets call it 123.jpg) appears every time i try to select another picture. so if i want to upload picture 456.jpg, using the java aplett, i klick on "add pictures..." and select 456.jpg. but in the "list of pictures to upload" it doesn't appear - instead there is the very first picture i ever tried to upload with the new java-aplett: 123.jpg. when i nevertheless click on "upload", i get the error mentioned above...
this java feature seems to be a great addition... if it would work for me!
i will do some more research on the errors and test with some other browsers/os

i was using slackware linux with java version "1.4.2_04" and mozilla 1.6 and the appropriate java plugin.

 
tuxxx

Joined: 2004-04-27
Posts: 13
Posted: Tue, 2004-04-27 12:32

ok, the error/problem does not appear in the standalone gallery, but embedded in postnuke!
it doesn't matter what os or browser to use...
help us please!!! there must be something wrong in an embedded gallery, whereas the java-slideshow works well!

 
tagalong

Joined: 2004-04-27
Posts: 3
Posted: Tue, 2004-04-27 17:27

I have observed the same problem mentioned by the others. Similiar installation (Apache2, PHP 4.3.6, PostNuke .726, WinXP w/SP1, Gallery 1.4.3). Form-based uploads (with Apache mod_rewrite off) seems to work fine, Applet-based doesn't. When I turn mod_rewrite on, neither method works. Possibly a problem with my Apache install (default install on Win has space in root dir -- <drive:>\Apache <space> Group\Apache2\htdocs\html\modules\gallery\)?

Have any of you noticed any errors in the apache error log pertaining to Gallery attempting to use some files/directories that don't exist (no specifics at present as I am at work, I can provide later if these would be useful). It appears as if some of the rewrites are getting messed up (maybe not -- I'm definately no expert on that).

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-04-27 17:46

[sorry, a bit late, but moving to the correct forum :)]

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Tue, 2004-04-27 20:49
h0bbel wrote:
[sorry, a bit late, but moving to the correct forum :)]

I know that the upload applet is based on Gallery Remote, but strictly speaking this is a Gallery problem that effects anyone using my site.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2004-04-27 20:50

Taomyn, yes, but it's still Gallery remote. And, since this is the forum that the GR developer follows, odds are that you get a better answer here.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2004-04-28 00:24

Hi all, I'd like to try to fix this before we ship G 1.4.3-pl1. Can one of you give me an ssh account on their server so I can debug this issue?

 
tdk1nc

Joined: 2004-04-28
Posts: 2
Posted: Wed, 2004-04-28 00:58

I'm having the exact same problem too, from both WinXP and OS X machines, though last night I was having an "Invald Login" error from my OS X machine. My copy of gallery is embedded in phpBB. Could the applet not be correctly pulling down permissions?

I'd lend an SSH if I had one, but my Linux web host doesn't offer them without a fee.

Barring a quick fix for this, is there any way I can disable/remove this option from my add menu?

-Troy

 
Verbal

Joined: 2004-04-26
Posts: 8
Posted: Wed, 2004-04-28 01:02
paour wrote:
Hi all, I'd like to try to fix this before we ship G 1.4.3-pl1. Can one of you give me an ssh account on their server so I can debug this issue?

I'd love to help, but I'm on a virtual hosting account. Don't think I can give out SSH access. :(

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2004-04-28 03:02

To disable the applets, remove the java/GalleryRemoteAppletMini.jar file.

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Wed, 2004-04-28 07:29
paour wrote:
Hi all, I'd like to try to fix this before we ship G 1.4.3-pl1. Can one of you give me an ssh account on their server so I can debug this issue?

Depends on what it is you want access to? I have SSH, but it's a Win2k3 server (yeah unsupported, whatever), but I'm still willing to help (I have daily backups so it's not too much of a risk :-? )

 
djbis

Joined: 2004-02-25
Posts: 64
Posted: Wed, 2004-04-28 08:52

I cannot upload or do anything with the Remote Applet. It can download all of the info, but it does not seem to be able to upload anything. It just locks up when I try to upload things.

I like its functionality, I am an amateur at this php stuff and could not help much. I am just here adding my comments and hoping that the staff at Gallery hears us.

Thank you.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2004-04-28 13:15

OK, forget the SSH access for the time being. Can someone PM me the URL, username and password of their PN deployment so I can test and look at the log? Or post the Java log on this thread?

Thanks...

 
paour
paour's picture

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

I've identified the problem: the CMS is using its own session management system, which Gallery doesn't know about, and so it can't pass the session cookie to GR, which then can't be authenticated to upload.

Specifically, what's happening is this:

- the applet receives from the page the cookie POSTNUKESID (which corresponds to the session_name() method)

- when the applet tries to connect to the server, it receives another cookie: PHPSESSID. This cookie is probably set by Gallery, but I don't know how to find out if this name is always used, and what the value is, so I can pass it to the applet.

Any PHP wizards can help me out?

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Wed, 2004-04-28 23:22
djbis wrote:
I cannot upload or do anything with the Remote Applet. It can download all of the info, but it does not seem to be able to upload anything. It just locks up when I try to upload things.

I like its functionality, I am an amateur at this php stuff and could not help much. I am just here adding my comments and hoping that the staff at Gallery hears us.

Thank you.

I'll contact you in email about this.

 
tuxxx

Joined: 2004-04-27
Posts: 13
Posted: Thu, 2004-04-29 12:22

does anyone already have a suggestion on how to fix this? thanks a lot =)

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Thu, 2004-04-29 12:59
tuxxx wrote:
does anyone already have a suggestion on how to fix this? thanks a lot =)

Perhaps reading the entire thread may give you a clue as to the status of fixing this, i.e. not yet, but the cause has now been found :D

 
tuxxx

Joined: 2004-04-27
Posts: 13
Posted: Thu, 2004-04-29 13:42

hehe i got that, but signe's post was suddenly getting my attention and i felt like typing something in here =)

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Thu, 2004-04-29 14:45
tuxxx wrote:
hehe i got that, but signe's post was suddenly getting my attention and i felt like typing something in here =)

djbis was a paid upgrade customer, so he was entitled to a little bit of hands-on attention if his Gallery wasn't operating right after the upgrade. It turned out to just be some confusion about how the applets worked.

 
tuxxx

Joined: 2004-04-27
Posts: 13
Posted: Fri, 2004-04-30 13:17

ok sorry, didn't mean to sound impatient or neglected ;)

 
Verbal

Joined: 2004-04-26
Posts: 8
Posted: Tue, 2004-05-11 12:58

Any progress?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-05-11 14:07

Not yet. The problem has been identified, but I have no idea how to solve it, and nobody has offered any information. My current point of view is to disable the applet when the Gallery is embedded.

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Tue, 2004-05-11 14:46
paour wrote:
Not yet. The problem has been identified, but I have no idea how to solve it, and nobody has offered any information. My current point of view is to disable the applet when the Gallery is embedded.

If you can explain a bit more about the issue with session variable a bit more clearly, perhaps detailing the messages your are sending and receiving, myself or someone else might be able to shed some light on the issue.

I definately know you can set the session id for the variable, it's in the Gallery config wizard.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-05-11 15:35

I've thought about this again, and I know what the problem is: when the applet tries to connect to Gallery, it's connecting to the gallery_remote2.php URL directly, not through the CMS, so the session handling and user management is that of standalone Gallery, which is bad.

I have to find a way of communicating to the applet the right URL.

Thanks for the kick in the butt that inspired me to investigate further!

 
pfaustino

Joined: 2004-05-11
Posts: 5
Posted: Tue, 2004-05-11 18:46

FYI, this also happens when embedded in Geeklog.

How does one run the standalone?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-05-11 22:09

I've fixed this for PostNuke (but it should work in other CMS) in G 1.4.4-b105. Please install and test it.

 
Monkeyshack
Monkeyshack's picture

Joined: 2003-05-07
Posts: 34
Posted: Tue, 2004-05-11 22:19
paour wrote:
I've fixed this for PostNuke (but it should work in other CMS) in G 1.4.4-b105. Please install and test it.

Where can we get this version? I dont see it with the Nightly builds.

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Tue, 2004-05-11 22:22

It won't be available until tonight... paour just finished the checkins in the last hour or so. Anonymous CVS takes 6-12 hours to sync, and the nightlies are only done once a day.

 
wdwms98

Joined: 2004-05-12
Posts: 1
Posted: Wed, 2004-05-12 19:53

Ok I just uploaded the updated .jar files from the latest build to my server that has PHPNuke, and no luck. still getting the "User cannot add to album" error. What other files should i change out other than the .jar files in /java?

Thanks!

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2004-05-12 20:59

It's not just the .jar files, some PHP files also need to change. You should update your entire Gallery installation to the latest 1.4.4 beta.

 
Hcor
Hcor's picture

Joined: 2004-05-13
Posts: 4
Posted: Thu, 2004-05-13 04:10

Hate to be the barer of bad news but that did not fix PHPNuke. Same problem still exists. I'm using 1.4.4 b111

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-05-13 04:39

Hcor, can you attach your applet log of the failure?

To get the Java log, right-click on the Java icon in the task bar tray (on Windows) and select Java Console.

 
Hcor
Hcor's picture

Joined: 2004-05-13
Posts: 4
Posted: Thu, 2004-05-13 05:21

Hrm...

I don't have the Java Console for some odd reason.
But I also had to revert back to the 1.4.1 release of Gallery as their were some other things flaky in the 1.4.4 b111 that I couldn't have on a production system.

I will replicate the problem using my development box tomorrow, and I can leave it that way till we figure the problem out. Then maybe I can also get the Java logs.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2004-05-13 05:26

The Java icon only appears after the applet loads. In Mozilla, you can also access it from the Tool>Web Development>Java Console menu.

 
Hcor
Hcor's picture

Joined: 2004-05-13
Posts: 4
Posted: Thu, 2004-05-13 05:27

I am actually using Firefox.

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Thu, 2004-05-13 09:23
paour wrote:
It's not just the .jar files, some PHP files also need to change. You should update your entire Gallery installation to the latest 1.4.4 beta.

Sorry, no can do. Tried to run the config wizard after the update, and 80% of the options don't display so who knows what damage it will do. Have had to stick to the current version and disable the applet :(

Unless of course you can tell me what PHP was changed specifically for this issue, if it's not too much, then I can give that a try with the new applets.

 
Hcor
Hcor's picture

Joined: 2004-05-13
Posts: 4
Posted: Fri, 2004-05-14 03:38

Yeah sometimes I wish updates for web software (PHPnuke, Gallery, etc.) would use the patch utility like system updates do. Would really make life easier.

I didn't get around to putting this to work on my dev box today, maybe tomorrow and I can start generating some java logs and see if we can get this thing fixed. Sure is a nice tool.

 
mswanson

Joined: 2004-05-25
Posts: 3
Posted: Tue, 2004-05-25 14:24

What is the current status on this?

I am experiencing the same problem with gallery 1.4.3 and phpNuke not being able to use the applet to upload images.

Paour, if you still need an SSH account for testing purposes I can provide one for you on my development server. I'm interested in figuring out how to get the applet working properly as I need to make the image upload process as easy as possible (the site is a portal for my family members).

Thanks, and Kudos for devoloping such a cool piece of software!

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-05-25 14:28

mswanson, I've had very little feedback on the presumptive fixes I've added to G 1.4.4, so I've very interested in being able to test on your dev server. However, I don't think I need SSH access. I just need you to set up PHPNuke and the most recent G 1.4.4 beta, and a test accont on PHPNuke so I can test.

Thanks for the offer!

 
mswanson

Joined: 2004-05-25
Posts: 3
Posted: Tue, 2004-05-25 17:14
paour wrote:
mswanson, I've had very little feedback on the presumptive fixes I've added to G 1.4.4, so I've very interested in being able to test on your dev server. However, I don't think I need SSH access. I just need you to set up PHPNuke and the most recent G 1.4.4 beta, and a test accont on PHPNuke so I can test.

Done!

Please email me at my member address (I assume you have access to this.. I just registered today so I'm not sure) and I'll give you the access details.

I have phpNuke 7.0 installed with gallery v1.4.4-cvs-b139 (which exhibits the problem mentioned in this thread).

Quote:
Thanks for the offer!

No sir, thank YOU!

Best Regards

-Marc Swanson-

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-05-25 20:42

It seems that PHPNuke uses not the PHPSESSID cookie to keep track of the user, but another cookie 'user'. I need information on whether that cookie name is configurable and how to get its value.

This is analogous to how phpBB handles user authentication and I can modify the applet (and Gallery itself) to pass that info along, but I need to know how it works in each CMS that doesn't use PHP sessions to keep track of users.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Tue, 2004-05-25 21:07

PHPNuke uses a cookie called 'user' that's hardcoded. I'm updating Gallery to support that.

I still need confirmation that my fixes of last week work on PostNuke.

I still need diagnostic and/or test deployments of the latest Gallery in conjunction with phpBB, Mambo and the other CMSs.

Anyone?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2004-05-26 15:56

Thanks to Marc Swanson for help on figuring out how to set cookies for PHPNuke.

From G 1.4.4b146, the applet successfully uploads to PHPNuke and PostNuke.

 
Taomyn
Taomyn's picture

Joined: 2003-11-11
Posts: 135
Posted: Thu, 2004-05-27 06:21

Excellent news, but how stable is 1.4.4b146? I tried a b14x previously to try and get the fix to this and found the config wizard wasn't working and reverted back :(

 
tingo

Joined: 2004-05-27
Posts: 11
Posted: Thu, 2004-05-27 23:51

Geeklog also uses it's own session handling (geeklog/system/lib-sessions.php). The code itself is to advanced for me to figure out (at least at this hour of the night), but it has this comment:
"This is the session management library for Geeklog. Some of this code was borrowed by phpBB 1.4.x which is also GPL'd". Does that help at all?

I have Gallery 1.4.3 embedded in Geeklog, and the applet gives the error message "Upload error: User cannot add to album." after the picture is uploaded. For fun, I tried both the 1.3.3-b1 applets and the 1.4-b13 applets, with the same result.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Fri, 2004-05-28 01:46

tingo, can you post the Java log of trying to upload with the applet? Thanks for the pointer to the right file within the geeklog install!