How to protect a download ?

Issues related to the Login tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html

TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
Post Reply
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Hello Naval

Dont know if still monitor this old thread but just in case ...

I have two problems (as usual ...)

a) whatever the type of file, zip, exe, pdf, the download box say " it is a file of type : PDF" ??

b) I seems have trouble to download big file (70 Mo) but 62 is ok; I got a file with zero bytes, any idea ?

Thanks anyway for your help already
User avatar
Navaldesign
 
 
Posts: 862
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: How to protect a download ?

Post by Navaldesign »

1) Only possible explanation is something wrong in your file names definition, lines

$file[1]= "filename1.pdf";
$file[2]= "filename2.doc";
$file[3]= "filename3.xls";
// Add as many as necessary


Check if the extensions used are correct.

2) There is no reason for this, at least not to my knowledge. Might be a server limitation ?
www.dbtechnosystems.com
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Thanks for your answer

Everything seems fine in the definition, and everything works well, just this TYPE wich is wrong even if the "Openw with ..." is ok

Image

Anyway not a big deal !

For the file size, I need to check with my hoster, but will be complicate !

Thanks for all
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Hello Naval
Hoping you still have an eye on this (old) thread
I try to improve my site step by step and discover recently the "Open link in Lightbox" function, which is working well

To make the process of download more fluent and not too complicate with multiples windows opening, I wonder if it could be possible to open the Login page in a lightbox ??
In this case the visitor stay on the downoload page (dimmed in the background) and when logging is filled successfullt, can click again the link to download

Hoping to be clear
User avatar
Navaldesign
 
 
Posts: 862
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: How to protect a download ?

Post by Navaldesign »

Yes, it is clear, however at the moment I unfortunately don't have the necessary time to see how / if this can be done. Maybe within a few weeks.
www.dbtechnosystems.com
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Having read it is already great !

Thanks for you time
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Hello Naval

I dont know if you still monitor this old thread but unless someone can point me on the right direction for an equivalent feature, you are still my savior ... up to the last few days (weeks ?)

Since some time, strangely, the script stop working, keeping ro ask to logging even if already logged

Do you have an idea how I can debug that ? some variable to monitor ? I am really a noobs with php, keep it in mind

Thanks in advance for you valuable help
User avatar
Navaldesign
 
 
Posts: 862
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: How to protect a download ?

Post by Navaldesign »

Most probably it is a server issue with the "session_save_path".
Often hosting companies make PHP updates and they change the default settings.

To verify if this is the case, try loging in and visiting a protected page (which does NOT contain the script).
If you can't visit that either, most probably the issue is what I mentioned.
www.dbtechnosystems.com
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Hello Naval

Glad to see you are still ready to help

My site is handled on AWS, feel that the discussion will not be easy ... :cry:

Thanks anyway
ciberyan
 
 
Posts: 32
Joined: Thu Feb 08, 2007 8:44 am
Location: France

Re: How to protect a download ?

Post by ciberyan »

Just as a follow-up, I, of course, get nothing from Amazon neither from my IT, which hate seeing individual insisting to have their own website :)

I have checked, and PHP does not have a session_save_path variable set in php.ini. It does, however, use /tmp/ on the server for temp session files, which we use in IT all the time, to keep users connected to their own profiles and accounts.

One thing to keep in mind is that when the site is live it is on multiple servers in multiple Amazon data centres, using load balancing, the load balancer will keep the user to the same server, while the session is alive, based on the SESSION_ID cookie, which PHP issues and uses.

> So your application needs to understand that it will need to use php sessions to keep to one server
> Our servers are refreshed at least daily, and thus you can not store files on the server today and expect them to be around tomorrow.


It is clearly a Session problem, the more weird is that the site is working well in the buffer zone on AWS and dont works when bring live

Dont know how I will end with that :?
User avatar
Navaldesign
 
 
Posts: 862
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: How to protect a download ?

Post by Navaldesign »

They are correct in saying that they use the /tmp directory and SHOULD work fine.
However, not always this is true.

Please test as I suggested and see if you can stay logged in a protected page (without the script), just to make sure that sessions work ok.
www.dbtechnosystems.com
Post Reply