Hi Brad,
Thanks for the update and getting onto this problem very quickly. I have re-uploaded your module and I have overwritten the existing files and re-installed the module however unfortunately the problems still persist.
As before, I am able to download the files through the linklocker generated links however when I open the files they are corrupt or damaged.
Here is an example error from Adobe Reader when opening one of the files:
“Adobe Reader could not open ‘test.pdf’ because it is either not a supported file type of because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded).”
Again this may be an error on my part or a problem with our server configurations, are there any specific php settings or other configurations required in order to use linklocker? (this occurs on two different servers)
Thanks for helping us with this.
Hi Mark,
Just wondering when you download the files are they the correct size or are they very very small?
I had this happen to me a couple of times too where the file looked like a real file but in fact it was downloading a very small sized (around 4Kb) file. The files I had uploaded were all around 4-5Mb in size so I knew something was a little off somewhere 😉
I can’t actually at the moment remember what the problem was but I am guessing it may have been some kind of memory limit on the server I was working on or something like that.
Don’t know if that helps though.
Best wishes,
Mark
Hi Mark,
I’ve verified .pdf and .rar working on my 2 servers before posting the updated module. I’m not aware of any special configuration that would be required. I would start by suggesting you verify that you are providing a valid web-accessible URL for the file which you are trying to lock. Note that this is not a file path, but a URL such as http://www.mysite.com/myfile.pdf. I would then put the link into a page (without locking the link) and make sure it downloads and opens properly. Additionally, are you hard coding the links, or are they being dynamically pulled and written into the call to Linklocker? I’m sure we’ll figure this thing out. 😊
Hi Brad,
Yes it was probably a path issue with me some time back as I seem to remember that you had allowed paths and now you have to have a full URL to the file, that’s probably what it was for me. Sufficed to say that I am not having any problems with it myself this end either I just remembered having a problem when I first started out with it as I was pretty much one of the first people to use it as you know 😉
Best wishes,
Mark
Hi guys,
Thanks for the quick response, I have found the problem!
While the links being passed to linklocker were correct (as they were the full URL’s to the files, not just the path to the file), and the files themselves were fine, they were in a directory that wasn’t excluded in my HTACCESS file for re-writing.
For some reason, linklocker is able to bypass htaccess and pass you the files (despite not having access to them), so everything appears to be working, but when you actually open the downloaded file it is corrupt.
Many thanks for your help
Glad to hear you got it figured out and fixed. The way the module works, it doesn’t bypass your .htaccess rules, it simply send the header information based on the filetype specified in the url. So, while it appeared to reach and send a corrupted file, it in fact was only sending the headers for the filetype, saved as the extension denoted in the URL that was passed in. Hence, it appeared as a corrupt file.
Thanks for using the module, and helping to better document its functionality. 😊
Hi Arty,
The quick answer is: maybe. I use the open source XSPF player on my site, but it would not work with generated links. The only way I found to hide my files with this particular player was to hard code them in the flash source. If you attempt to use this module with a player and find that it works, please let the rest of us know and I’ll add it to the documentation.
Thanks, Brad
Ok, the only thing I can think of that might be the problem is that you need a folder in your modules folder called “linklocker” which holds the mcp.linklocker.php, mod.linklocker.php, index.html and docs.txt. The lang.linklocker.php file gets copied to the languages/system/ folder. Should show up then. I’m updating the download at the start of this thread to include the files broken down into a folder called linklocker & updating the docs. Try making that little fix though, and see if it doesn’t work for you.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.