thebodster / clients-oriented-ftp

Automatically exported from code.google.com/p/clients-oriented-ftp
0 stars 0 forks source link

Automatic sign out after upload #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

Antoine again.... I know.. I know ;p

I have tested uploading files. Small files work great (lets say 100mb and 
below). After upload, you are redirected to a page to "link" upload to a client 
(you choose the client to which the uploaded file is to be made available). I 
have tried the same with 300mb files and 2gb files.. Once the upload is over, 
there is an automatic log out, and redirection to login page. Once you log back 
in, the file uploaded is only available from "upload from ftp" (hard to find 
for new customers). This would give some trouble with our "very intelligent and 
resourceful" customers... hehe. Is there a "sign out when no response" time 
interval we can change? Thanks again!

Original issue reported on code.google.com by antoine....@abaca-audio.com on 5 Apr 2012 at 3:55

GoogleCodeExporter commented 9 years ago
Hi Antoine!
1 question about the file that you find via Upload from FTP later. Did you 
download it? Is it OK or is it corrupted? (just to check if the upload finishes 
correctly)

Original comment by i...@subwaydesign.com.ar on 5 Apr 2012 at 4:27

GoogleCodeExporter commented 9 years ago
Antoine, could you please try changing the timeout value on the file 
process-upload.php? 

Line 28 says @set_time_limit(5 * 60);

Since it's defined in seconds, it's actually set to 5 minutes there.

Please try changing that to 120*60 or something big, and try again.

Also, do you know if your server has safe_mode activated? Because that setting 
prevents that line from working and it stays on the default one (probably 30 
seconds)

Let me know please.

Original comment by i...@subwaydesign.com.ar on 5 Apr 2012 at 6:02

GoogleCodeExporter commented 9 years ago
I have tried changing time out limit to (120*60), no change. The file uploads 
completely, but after upload, it automatic logs out the user, redirecting him 
to login page. File uploaded is thus in the /temp folder on server, and hard to 
find for ("intelligent") customers! :(

Original comment by antoine....@hrmediagroup.ca on 6 Apr 2012 at 12:16

GoogleCodeExporter commented 9 years ago
Oh I see. I have to find out which script is giving you a time out.
Did you check your safe_mode setting? Let me know if it is on or off please.

Original comment by i...@subwaydesign.com.ar on 6 Apr 2012 at 3:02

GoogleCodeExporter commented 9 years ago
Safe_mode is off. Here is a print screen of what our PHP Configuration looks 
like on our server!

Original comment by antoine....@hrmediagroup.ca on 6 Apr 2012 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
Hey! Hope you're doing well. Have you had time to check out for the automatic 
log out issue? Let me know!! Also, I am looking for a way to change the 
automatic file permissions attributed to new uploaded files (the default perms 
are 0644, and would like to make them 0711 or other permission by default when 
uploaded). This would allow files to automatically be unavailable to clients 
after upload. Thank you!

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 3:17

GoogleCodeExporter commented 9 years ago
Hello Antoine!!
I've tested 711 and I've found that some files become completely unavailable 
(eg: .txt files).
I believe that the best method to solve this is by using a .htaccess file on 
the upload folder, but honestly I had trouble setting that up.
I'll look around again and try to see if I can come up with a real solution.

If you still want 711 by default, let me know and I'll tell you how to do that.
Thanks!

Original comment by i...@subwaydesign.com.ar on 9 Apr 2012 at 5:22

GoogleCodeExporter commented 9 years ago
Hi!
Maybe changing the default to 700 would do the job, just so clients don't have 
access to files (reading) once they have uploaded it. If you can tell me how, 
I'll find and try it out!
We are still having the automatic log out problem, and have no idea why that 
is.. is it the flash plugin which jams and disconnects the user.. the 
max_input_time (60 secs) or max_execution_time (30 secs) settings which could 
cause the problem.. Timeout setting in projectsend app files is now set to 24 
hours (1440 * 60), but problem still persists! :( Thanks again!!

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 6:37

GoogleCodeExporter commented 9 years ago
Hi Antoine!
Do you use the e-mail account that appears as your username?
I can send you a zip version of r120 where it will be easier than on 110 to 
edit some of this settings and try again.

Original comment by i...@subwaydesign.com.ar on 9 Apr 2012 at 6:56

GoogleCodeExporter commented 9 years ago
Last thing....... Haha!

Do you know a way to set that uploaded files are automatically sent to the only 
client available. That is, once upload is finished, files are automatically 
transferred to client folder (only one client in our settings) and email 
notification is sent. User is confirmed that upload is complete.. Any thoughts?

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 6:57

GoogleCodeExporter commented 9 years ago
Yes you can send them to me. I have modified some of the files.. which ones are 
different in version r120.. could I change only these files? Thanks!

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 7:00

GoogleCodeExporter commented 9 years ago
Most of the files were changed as I started documenting the code.
Do you know which ones you modified? I can tell you if those have important 
changes.

About the automatic upload, the only fast thing I can think of is to add a 
jquery code to the form that appears after you uploaded the files.
Since the name and client fields are filled in automatically, and you only have 
1 client, the code would only need to click the continue button.

I can send add the code to do that on the r120 file that I'll send you later.

Original comment by i...@subwaydesign.com.ar on 9 Apr 2012 at 7:08

GoogleCodeExporter commented 9 years ago
Alright! If you can add that with the new jquery code easy to take in or out 
that would be perfect! I will make the changes we made on r110 to the new r120. 
Your software is getting great! :) Woohoo! Have a great day! 

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Could it be, for the auto log out, that the cookies get invalid after some 
time. It seems that since the upload takes some time, once it is over and the 
upload-form page tries to load, the users credentials check (checks for cookies 
on user login info, and user rights level) fails because the cookies are timed 
out? I believe this is our answer..!!

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 7:27

GoogleCodeExporter commented 9 years ago
Great! I thought of the cookies too, so in one of the latest commits I changed 
the value to 30 days. I'm sending you the zip file in a few minutes. Let me 
know if this solves the problem please

Original comment by i...@subwaydesign.com.ar on 9 Apr 2012 at 8:51

GoogleCodeExporter commented 9 years ago
Ok thanks! The problem is indeed the cookies. When you login, and click 
remember me, the problem does not happen. If you do not click remember me when 
logging in, there is no cookie created and thus the problem arises. Is there a 
way to create a cookie anyhow, or keep user logged in for the session time 
(without any cookies)? I have seen that cookies are only created if user 
chooses remember me!

Original comment by antoine....@hrmediagroup.ca on 9 Apr 2012 at 9:03

GoogleCodeExporter commented 9 years ago
Oh, nice find Antoine!!! Thanks.
I've already sent you the zip file with r120.

I'll look for a way to keep the php session alive and see if that solves the 
issue. I'll write again as soon as I find a suitable solution.

Original comment by i...@subwaydesign.com.ar on 9 Apr 2012 at 9:12

GoogleCodeExporter commented 9 years ago
Antoine, can you run a phpinfo on your server? I'd like to know the value of 
the setting session.gc_maxlifetime
I think that's one of the keys here.
It's probably set to 1440 (which is 24 minutes) and after that time the session 
expires.

I'm thinking of making an ajax call every 5 minutes or so, to try and keep the 
session alive.

Original comment by i...@subwaydesign.com.ar on 9 Apr 2012 at 11:06

GoogleCodeExporter commented 9 years ago
Hi!

Indeed, after a phpinfo on our server the session.gc maxlifetime value is set 
to 1440 ! The best would be to have something refresh the connection before the 
maxlifetime value.. increasing the maxlifetime value much more would change 
values for the whole server.

Original comment by antoine....@hrmediagroup.ca on 10 Apr 2012 at 2:25

GoogleCodeExporter commented 9 years ago
I think I got it. If I send you the files and instructions via e-mail, would 
you test it please?

Original comment by i...@subwaydesign.com.ar on 10 Apr 2012 at 3:39

GoogleCodeExporter commented 9 years ago
Sure, I'll be glad to!

Original comment by antoine....@hrmediagroup.ca on 10 Apr 2012 at 1:41

GoogleCodeExporter commented 9 years ago
The problem still arises on files that take a while to upload (tried 1GB file). 
With "remember on" no problem, cookies keep session active. Without remember me 
(majority of cases when client log in), session deactivates when upload takes 
too long (when page upload-form.php refreshes after upload). I did not try the 
files you were to send me yet, but I have not found a way to increase session 
time without implanting cookies. :( Hehe!

Original comment by antoine....@hrmediagroup.ca on 10 Apr 2012 at 7:13

GoogleCodeExporter commented 9 years ago
Hi Antoine! I'm just in the middle of changing some of the structure and 
how/when some files are loaded, and it's taking a little longer than I planned.
I hope that tomorrow I'll have this sorted up and I will send you the test 
version.
I already made an ajax call every minute on the upload form that triggers an 
empty php function, I guess that will do.
If not, I'll have to think of some other solution.

Original comment by i...@subwaydesign.com.ar on 11 Apr 2012 at 5:39

GoogleCodeExporter commented 9 years ago
Alright perfect! Can't wait to test that! Let me know!

Original comment by antoine....@hrmediagroup.ca on 11 Apr 2012 at 5:45

GoogleCodeExporter commented 9 years ago
Hey!

Hope you're doing well! Did you have time to get news yet?

Let me know!

Original comment by antoine....@hrmediagroup.ca on 12 Apr 2012 at 5:40

GoogleCodeExporter commented 9 years ago
Hi! I'm sending you a zip file right now.
I haven't been able to fully test it properly but I don't think there are any 
errors that prevent the program from working.
Let me know how this works for you please.

Thanks!!

Original comment by i...@subwaydesign.com.ar on 12 Apr 2012 at 6:12

GoogleCodeExporter commented 9 years ago
I am testing this right now. What is the global_time_limit parameter you have 
set in sys.vars ? What does it mean or do? Thanks!

Original comment by antoine....@hrmediagroup.ca on 13 Apr 2012 at 6:33

GoogleCodeExporter commented 9 years ago
Still the log out problem when uploading 400mb files.. takes too long I guess 
(about 1 hour it took, and when page refreshed, it when straight to login page).

Original comment by antoine....@hrmediagroup.ca on 13 Apr 2012 at 7:35

GoogleCodeExporter commented 9 years ago
Ok, here is the news:
I have modified some values for max lifetime and others.. but problem is the 
same as it used to be. I will send you a PDF print of a PHP info of our server 
to your email. If there is something you believe would cause this...

Original comment by antoine....@hrmediagroup.ca on 13 Apr 2012 at 9:11

GoogleCodeExporter commented 9 years ago
I maybe have an idea... if we set a cookie at login even if "remember me" is 
not "on", and set it's expire time at "0" (zero), that would make the cookie 
expire at browser close. Then, if remember is on, then implant a cookie set by 
a time amount (30 days if you wish). In our situation, we would not use this, 
to avoid cookies staying active on public computers and cause security 
problems. What do you think? I think by implanting a cookie whatever the choice 
for "remember me" is, and expire it at browser shut down would be the best. 
Remember me should maybe be optional in php files (// on line).

Original comment by antoine....@hrmediagroup.ca on 13 Apr 2012 at 10:22

GoogleCodeExporter commented 9 years ago
hi guyz... i'm trying to upload a 1gb .mov file.. after some time it goes back 
to UPLOAD with no menu or buttons...

plz let me kknow

Original comment by srsyste...@gmail.com on 15 Apr 2015 at 12:33