Jimage upload conflicting with the session

Image previewer add-on.
Post Reply
kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Jimage upload conflicting with the session

Post by kkalsan »

Hi,

When I open the Jimage upload page for Image upload the session is there.
But, as soon as I move to any other page or even refresh the same page the session gets expired immediately. Please suggest the probable cause for the same.

The website URL is : http://www.wikipixr.com/homes/upload_image
Login:
username: kkalsan
Pass: kkalsan123

Look forward to hear from you.
Thanks,
Kkalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload conflicting with the session

Post by support »

Did you have a look to the following tutorial ?
http://www.jfileupload.com/products/jfi ... ation.html

You need to propagate the session in the applet calls.
I see: +document.getElementById('ImageSessid') in your code but is it the PHPSESSION ?

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload conflicting with the session

Post by kkalsan »

Hi,

Yes I have already viewed the tutorial.
I can append the session ID in URL but the problem I am facing is not only for submit button but also whenever I move to any other page in the website after the upload page the session got expired by itself. Please suggest.

also document.getElementById('ImageSessid') in my code but is PHPSESSION ID.

Look forward to hear from you.

Thanks,
Kkalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload conflicting with the session

Post by support »

And how do you move to another page ? Is it a link in the page that includes the applet ?
Or is it with "forward" parameter of the applet ?

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload conflicting with the session

Post by kkalsan »

Hi,

Please find below the response:

And how do you move to another page ?
Response: When I login and click on upload page. Then I move to the upload page. As the applet loads and I click on another link I got redirected to the another page i.e home, browse, my gallery etc.

Is it a link in the page that includes the applet ?
Response: To include the applet I am including the js file.

Or is it with "forward" parameter of the applet ?

Response: No, I am not using the forward parameter of the applet. I am simply using the submit button which uploads the image and submit(save) the data from the form.

Please suggest.

Thanks,
kkalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload conflicting with the session

Post by support »

I can reproduce the problem under IE7 and Firefox2 when I click reload but I don't think it comes from the applet itself. I've noticed a JavaScript error on login page and on applet page:
Error: missing name after . operator
Source File: http://www.wikipixr.com/homes/login
Line: 11, Column: 17
Source Code:
document.[imgName].src='images/'+imgSrc+'.jpg';
Error: this.rb is null
Source File: http://www.wikipixr.com/js/tooltip.js
Line: 44

It may be the problem, the JavaScript could be broken (can come from Applet integration) and then the way you check session fails. What do you think about ? If you remove the applet, do you still have the problem ?

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload conflicting with the session

Post by kkalsan »

HI,

The error got resolved as soon as the applet is removed.
I am sure on this that 'Error: missing name after . operator' is not creating this error.

Please suggest.

Thanks,
Kkalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload conflicting with the session

Post by support »

Do the JAR files of applet are in a protected area too ? Maybe the Java plugin tries to load the JARs without session id and then your application invalidate the session. Could you move the JAR files and .properties in a public area ?

Post Reply