Pepak.net Forum

Discussion in english => Discussion in english => Topic started by: pepak on November 04, 2009, 11:46:40 AM

Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 11:46:40 AM
Quote from: "Forge"Hello Pepak

Your plugin don't work on my website.
I've change the htaccess and place file (zip) into directory named ,,fichiers" (i'm french) in the root (/www/fichiers).

- Where the dir ,,fichiers" can be place ?
- this is my lines in htaccess :
RewriteRule ^(fichiers/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f

Is it ok ?

Thanks
Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 12:06:10 PM
Placement of the downloads directory
The downloads directory can, theoretically, be placed anywhere in the directory tree of your website. You just need to make sure that two places are set up accordingly:

1) The .htaccess file located in the root of your WordPress installation (that is, suppose that your WordPress files - wp-config.php and others - reside in /www directory; then you need to edit /www/.htaccess file, not any other .htaccess file you may possibly have) needs to have a RewriteRule added to it:
RewriteRule ^(files/.*) /index.php?sdmon=$1 [L]Where files is a relative path to your download directory, relative to that .htaccess file. E.g., if your downloads are placed in /www/deeply/hidden/files and your WordPress is in /www, you will want
RewriteRule ^(deeply/hidden/files/.*) /index.php?sdmon=$1 [L]
2) Plugin's configuration needs to reflect the placement as well. The "Allowed directories" will almost always contain the same text as your RewriteRule, before .*. E.g., in the example above, deeply/hidden/files/

Why it doesn't work
That's quite difficult to tell. What exactly happens if you try to download an existing file, e.g. www.yourwebsite.fr/fichiers/public.zip (http://www.yourwebsite.fr/fichiers/public.zip)? And what happens if you use www.yourwebsite.fr/index.php?sdmon=fichiers/public.zip (http://www.yourwebsite.fr/index.php?sdmon=fichiers/public.zip) instead? If #2 works and #1 does not, your .htaccess file is either wrong or even ignored by your webhost. If neither of them work, it is likely the plugin's configuration is incorrect. I'll need to know which it is before I can suggest further steps.
Title: Simple Download Monitor problems
Post by: Forge on November 04, 2009, 12:26:15 PM
The second soluce " www.yourwebsite.fr/index.php?sdmon=fichiers/public.zip (http://www.yourwebsite.fr/index.php?sdmon=fichiers/public.zip) " work perfectely.
I searching to resolve htaccess problem.

I put this link waiting solution.
Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 12:40:30 PM
That means your .htaccess file is either not working at all - some (many?) webhosts don't allow its use at all or with strict limitations.

What kind of URLs do you use for your WordPress posts? That is, if you post an article about "It is not working!", how exactly will its URL look? Will it be something like www.mywebsite.fr/2009/11/it-is-not-working (http://www.mywebsite.fr/2009/11/it-is-not-working) or rather something like www.mywebsite.fr/index.php?id=123 (http://www.mywebsite.fr/index.php?id=123)? If it is the first case, your webhost supports .htaccess and we just need to find out what's wrong with yours. The other case could mean that either you didn't even try to use "cool URI's" and left WordPress in its default state (SDM might still work if you write a proper .htaccess), but it could also mean that your webhost doesn't support .htaccess and you won't be able to use SDM at all.

Btw., you don't need to register to be able to post here. Although, registration brings the benefit that you can select your language here (http://forum.pepak.net/profile.php?section=settings&id=27) and translate the whole forum.
Title: Simple Download Monitor problems
Post by: Forge on November 04, 2009, 01:53:14 PM
It work in the first case.

...to late for inscription ^_^
Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 01:59:25 PM
If your .htaccess doesn't contain any sensitive data, send it to me (pepak (at) pepak.net) and I'll check it.
Title: Simple Download Monitor problems
Post by: Forge on November 04, 2009, 04:08:45 PM
htaccess sent.

Another question : is it possible to print this count in post ?
Ex: "Myfile donwloaded 30 times"
Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 04:16:49 PM
Not really. The plugin doesn't even know from which page (if any) the file was linked. Theoretically, I could publish a function which would return a number of downloads that could be called from a template, but it really seems like it'd be out of the intended scope.

As for your .htaccess, I am surprised it works at all :-)
I admit I am no htaccess wizard, though.

Try to replace the two lines with:
RewriteBase /
RewriteRule ^(fichiers/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 04:23:30 PM
If that doesn't work, it may actually be the case of your webhost not supporting .htaccess. I have just tried accessing the site, and:

1) The site's URLs are not, in fact, "cool URIs" - they are regular PHP links, although in a bit unusual syntax (/index.php/parameters is interpreted by PHP the same way as /index.php?parameters). Still, they work without ANY help from htacceess (what htaccess allows is /parameters).

2) I tried accessing the site with www1. instead of the starting www.. Your htaccess should have rewritten it to a www. form, but it didn't - it just let me go to a www1. version of your site, which leads to an empty directory. So it seems .htaccess is ignored completely. That would, of course, prevent SDM from working.
Title: Simple Download Monitor problems
Post by: Forge on November 04, 2009, 04:35:02 PM
It doesn't work.

This file is on the top of this page with the link "hack" (with index?sdmon=) and "no hack" (simply linked)
http://www.masterfight.net/index.php/diffusez-masterfight/
Title: Simple Download Monitor problems
Post by: pepak on November 04, 2009, 04:43:05 PM
I am afraid you will need to contact your webhoster and ask them why .htaccess (or mod_rewrite) is being ignored. Wihout htaccess and mod_rewrite, the plugin can't function as intended (you could still post all your downloads as /index.php?sdmon=fichiers/file.zip, but that would defeat the whole point that the monitor can track downloads even from direct links).
Title: Simple Download Monitor problems
Post by: Forge on November 04, 2009, 04:47:25 PM
Ok i try this.
Thanks a lot for your help and your good job.
Title: Simple Download Monitor problems
Post by: Ricardo on November 08, 2009, 11:35:29 PM
Hi

When using your plugin all the files "covered" by the plugin wont appear on the blog...for example i have a folder onmy server called "images" if i setup simple download monitor to that folder the images wont display on a post:

example:



nothing appears on the blog, if i erase the lines from the .htacess file they appear

What can i do to solve this?

Thanks
Title: Simple Download Monitor problems
Post by: pepak on November 09, 2009, 06:41:00 AM
I never actually tried or intended to use the plugin with images. I'll test it and see what can be done.
Title: Simple Download Monitor problems
Post by: Ricardo on November 09, 2009, 02:43:53 PM
i tried other files like swf and same thing happens...by using your plugin i can see who is hotlinking to my files...i dont have acess to the stats on my server so i was hoping your plugin would tell me if anyone hotlinks to my files.
Title: Simple Download Monitor problems
Post by: pepak on November 09, 2009, 04:14:31 PM
The cause is quite simple: The plugin was intended for downloading, so it sends HTTP headers useful for downloading (which incidentally prevent display in pages). Support of "hotlink monitoring" like you suggest is possible and even feasible. I'll look into it in near future (I hope).
Title: Simple Download Monitor problems
Post by: Ricardo on November 10, 2009, 12:43:57 AM
Thanks for the report...it would be a great addition to the plugin if it could do that...do you know any other plugin that can do that? i've been searching for a few months for one but didnt find one
Title: Simple Download Monitor problems
Post by: Rizaldy on November 10, 2009, 06:10:03 AM
hai pepak, this great plugin plugin is just what i need, but i can't make it work.

ok here is my situation, i had a folder named download located in root, an inside it has 2 sub-folder

after i install plugin and go to wp-admin -> setting -> Simple Download Monitor
- in Allowed directories i put ==>  download/
- in Allowed extensions i put ==> zip|rar|7z|avi|mkv
- in Store detailed logs? ==> i check Use detailed statistics.

and then i put
RewriteRule ^(download/.*) /index.php?sdmon=$1 [L]
directly above RewriteCond %{REQUEST_FILENAME} !-f
as instructed

but when i go to wp-admin ->  tools -> Simple Download Monitor
there's no file at all......
there is text :


All downloads

Show nonexistent downloads

     Filename      Download count    Last date


but my files aren't showing.

am i missing something ? i'm at lost now
i hope you can point me to right direction

thanks
A-r
Title: Simple Download Monitor problems
Post by: pepak on November 10, 2009, 06:36:57 AM
Quote from: Rizaldybut my files aren't showing.

am i missing something ? i'm at lost now
i hope you can point me to right direction
The files don't show until someone downloads them. So the first step should be, try to download some of your files and see if they appear in the list.

Try to download one of your files through a special link: instead of http://www.youwebsite.com/download/file.zip, try to use http://www.yourwebsite.com/index.php?sdmon=download/file.zip If it downloads, then the plugin is configured correctly and either your .htaccess file is incorrect or your webhoster doesn't support it (or mod_rewrite). Try the steps I suggested to Forge earlier in this thread.
Title: Simple Download Monitor problems
Post by: Rizaldy on November 10, 2009, 07:50:03 AM
Thanks for fast reply pepak :D

i tried the
http://www.yourwebsite.com/index.php?sdmon=download/file.zip

and it work!!

at first i thought that all my download folder and file in it will be listed in tools -> Simple Download Manager.
but, it's just listed the file being downloaded, now i understand :D

thank again pepak, and thanks for this great plugin :D
Title: Simple Download Monitor problems
Post by: surfer96 on November 13, 2009, 08:39:27 PM
Works perfectly, nicely done! One question: how to reset to stats to zero?
Title: Simple Download Monitor problems
Post by: pepak on November 13, 2009, 08:52:49 PM
There is no function for that, but you can simply delete all content from the two SDMON tables in PhpMyAdmin (or whatever you use for MySQL management).
Title: Simple Download Monitor problems
Post by: Ricardo on November 22, 2009, 07:41:38 PM
Quote from: pepakSupport of "hotlink monitoring" like you suggest is possible and even feasible. I'll look into it in near future (I hope).

any prediction on this feature?
Title: Simple Download Monitor problems
Post by: pepak on November 22, 2009, 07:49:51 PM
I didn't have the time this weekend, but I'll look at it this week.
Title: Simple Download Monitor problems
Post by: pepak on November 24, 2009, 04:32:39 PM
It works! Now I just need to remember how one uploads plugins to the WordPress repository.
Title: Simple Download Monitor problems
Post by: pepak on November 24, 2009, 06:32:20 PM
And it is online! Crowds rejoice and Pepak is showered with glory. Or something like that. ;-)
Title: Simple Download Monitor problems
Post by: pepak on November 29, 2009, 06:21:23 PM
Version 0.08 supports deletion of selected statistics.
Title: Simple Download Monitor problems
Post by: MrBoss on December 02, 2009, 12:01:08 AM
I created 'facul' and within this directory has no other directories and subdirectories and files scattered as I create it. Htaccess file for the plugin to work properly?
I put the htaccess in the 'facul' with the following lines:
Options + Indexes

RewriteEngine On
RewriteRule ^ (optional /facul/.*) / index.php? Sdmon = $ 1 [L]
RewriteCond% (REQUEST_FILENAME)!-F
RewriteCond% (REQUEST_FILENAME)!-D
Title: Simple Download Monitor problems
Post by: pepak on December 02, 2009, 06:31:03 AM
I am not quite sure what you are trying to say. But looking at your .htacess file, I can see that there are several major errors:

- You have a number of extra spaces where there should be none
- the "optional" string shouldn't be there at all, unless all your files are stored in /optional/facul/...
- "Sdmon" should have a lower-case "s".

Why didn't you copy the relevant line from the readme file exactly as it was written there? Then you would simply replace files with facul and be done with it.
Title: Simple Download Monitor problems
Post by: MrBoss on December 02, 2009, 10:59:45 AM
I has directory "facul" inside this folder has other many folders and files. I want create one .htaccess in "facul" and this working for all files and directory inside in "facul"


In .htaccess has this lines:

RewriteRule ^(facul/.*) /index.php?sdmon=$1 [L]
RewriteCond% (REQUEST_FILENAME)!-F
Title: Simple Download Monitor problems
Post by: pepak on December 02, 2009, 12:47:43 PM
1) Did you update the plugin settings to monitor directory facul/?
2) Did you try to call Simple Download Monitor directly (here (//./viewtopic.php?pid=123#p123)) and with which results?
Title: Simple Download Monitor problems
Post by: MrBoss on December 03, 2009, 11:17:24 AM
1) Did you update the plugin settings to monitor directory facul/? YES
2) Did you try to call Simple Download Monitor directly (here) and with which results? YES - http://www.marcelocarvalho.com/index.php?sdmon=facul/Materiais%20II/CAD%20em%20SSA.doc
Title: Simple Download Monitor problems
Post by: pepak on December 03, 2009, 01:01:49 PM
Yep, seems to work. In that case SDMON is installed and set up correctly and the problem lies either in the .htaccess (which seemed OK to me) or the fact that mod_rewrite is not supported by your webhoster. You will need to contact your webhoster's tech support and ask them about that.
Title: Simple Download Monitor problems
Post by: palantium on March 20, 2010, 12:35:22 PM
I give more details of the problem:

The problem happens when I change the .htaccess

The names of the downloads are:

"Milenio% 203% 20 -% 20T9P28% 20 -% 2014-03-10% 20% 20 -% 20Proyecto% 20Dachau,% 20the% 20analizamos% 20resultados% 20 -% 20of% 20Mesa% 20redacci% C3% B3n.mp3"

it would be:

"Milenio 3 - T9P28 - 14-03-10 - Proyecto Dachau, analizamos los resultados - Mesa de redacción.mp3"

When I edit the .htaccess, downloads are renamed to "Milenio", simply delete everything after the space there.

I use the Wordpress version 2.9.2 and the latest version of your plugin. Except for the problem of the  .htaccess, the plugin properly account downloads.

Thanks for your attention. Greetings.
Title: Simple Download Monitor problems
Post by: pepak on March 20, 2010, 01:39:15 PM
Seems to me the problem might be the accented "o" at the end of the filename ("redacción"). Try to change it to regular "o" and see what happens then.
Title: Simple Download Monitor problems
Post by: palantium on March 20, 2010, 05:36:24 PM
No, It also occurs in discharges without accented words.
Title: Simple Download Monitor problems
Post by: pepak on March 20, 2010, 06:45:14 PM
In that case give me an example link (real link on your website) which should work but doesn't and I'll try it on real site.
Title: Simple Download Monitor problems
Post by: winters on April 21, 2010, 05:39:11 PM
Hi i seem to have some problem trying to get your plugin working:

My wordpress instance is setup in /www/blog/ and my download files is located in /www/blog/files/. I edited my .htaccess file to include the line as follows:

# BEGIN WordPress

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteRule ^(files/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]


# END WordPress

However when I click on the link i get an error for page cannot be found. If I change the line and use "RewriteRule ^(blog/files/.*) /index.php?sdmon=$1 [L]" instead the file loads but the plugin doesn't pick up anything.

When i use the direct link with http://domain/blog/index.php?sdmon=files/public.pdf everything works perfectly.

Thanks for you help in advance.
Title: Simple Download Monitor problems
Post by: pepak on April 21, 2010, 05:46:37 PM
Unfortunately, I am not very good with mod_rewrite; particularly, I don't really understand what happens when RewriteBase is used.

I would try this rule, maybe it will work:
RewriteRule ^(files/.*) /blog/index.php?sdmon=$1 [L]
Title: Simple Download Monitor problems
Post by: winters on April 21, 2010, 05:51:36 PM
O i forgot to mention im using wordpress 3.0 right now.
Title: Simple Download Monitor problems
Post by: winters on April 21, 2010, 06:05:30 PM
Its working now, thanks for your quick reply!
Title: Simple Download Monitor problems
Post by: pepak on April 21, 2010, 06:06:00 PM
That should have no influence, as shown by your success when trying "http://domain/blog/index.php?sdmon=files/public.pdf".
Title: Simple Download Monitor problems
Post by: Nick on June 24, 2010, 12:50:08 PM
Hi

I struggling to get SDM to let me show inline files. I want to display PDFs and GIFs in the browser but can't get it to work. Whatever I do in Options under Inline Files makes no difference.

Here is what I'm using.

\.(gif|pdf)$

Any ideas?

Thanks
Title: Simple Download Monitor problems
Post by: pepak on June 24, 2010, 05:20:33 PM
The regexp you wrote seems correct to me and should work.

Let's try a seemingly unrelated topic: What behavior do you expect from these files, and what behavior do you see with SDM? I suspect that you understand "inline" differently than was intended: "Inline" in this context means with a HTTP header "Content-disposition: inline;", which basically means that if a browser understands that particular file, it may display it within the page rather than download it. This should work with images without any problems, but I rather doubt it will work with PDFs.

Maybe post a link to a file which doesn't work for you, so that I can check what headers my browser receives when trying to download that file.
Title: Simple Download Monitor problems
Post by: Nick on June 25, 2010, 01:07:33 PM
Thanks for getting back to me.

Here's a link to a pdf on my site http://shearinglayers.com/test-for-inline-pdf/

It seems to work exactly how I want it to in Safari (with this one page pdf coming up in the browser window), but in Firefox it always prompts for a download with a dialog that asks what software I'd like to use to view it.

So I guess my problem about the browser -- and nothing to do with your fab plug-in :)

Sorry I didn't test it with multiple browsers before my earlier question.

Thanks for your concern and for the plug-in.

Nick
Title: Simple Download Monitor problems
Post by: pepak on June 25, 2010, 05:31:11 PM
I see what's the problem: The code you have
...is intended for linking to documents and clicks usually result in a browser offering an action (download, open, etc.). The "inline" function of SDM is intended for codes such as

These are intended for display within the HTML page itself.
Title: Simple Download Monitor problems
Post by: MixMan on July 01, 2010, 01:09:51 PM
Hi Pepak and thanks for the useful plugin!

In the allowed directories I have put:

 "wp-content/uploads/"

In the allowed extensions:

 "mp3"

In the .htaccess file:

RewriteRule ^(wp-content/uploads/.*) /index.php?sdmon=$1 [L]

Everything works, but the plugin gives me stats for all kind of files, not just .MP3 (jpg, rar, ...)

What's my mistake?
Title: Simple Download Monitor problems
Post by: pepak on July 01, 2010, 03:38:32 PM
Interesting. I never thought of it, but I have just tried it and you are correct.

I am at a loss what to do with it - it's not a bug per se, but a rather strange (though logical) behavior. What happens is:

1) User tries to access a file with other than allowed extension.
2) SDMON processes the requests, checks for the existence of file and correctly logs a download attempt.
3) SDMON then checks permissions and because the file doesn't have a permitted extension, it refuses to download it, reporting a "Not found" error instead.

Now the question is, what is the correct behavior? The current one is actually OK, because there was an attempt to download that file and that files did exist. Two alternatives I can think of are:
1) Not log anything because the download didn't even start - it was just an unsuccessful attempt.
2) Log the attempt but put it among the nonexistent files. Which would hide the attempt from main view while still keeping it for tracking purposes, but at the cost of some confusion (why is the access stored among nonexistent files wjhen the file exists?)

Maybe I should change the boolean flag (exists/doesn't exist) to an enumerated type (exist and valid/exists and invalid/doesn't exist)? I'll need to think about it. I'd appreciate an input.
Title: Simple Download Monitor problems
Post by: MixMan on July 01, 2010, 04:19:27 PM
You got me quite confused. I just want to have stats for only mp3 files, isn't the "Allowed extensions" option just for that?

The option doesn't seems to work.
Title: Simple Download Monitor problems
Post by: pepak on July 01, 2010, 05:20:02 PM
Quote from: MixManYou got me quite confused. I just want to have stats for only mp3 files, isn't the "Allowed extensions" option just for that?

The option doesn't seems to work.
The main purpose of the option is to prevent access to files not designated for download.

As I said, I'll need to think about it and about ways of fixing it, if I decide it needs fixing (which it probably does).
Title: Simple Download Monitor problems
Post by: MixMan_ on July 01, 2010, 06:40:28 PM
I thought it was for restricting the stat processing to certain file types.

"Only files with extensions matching this regular expressions will be processed."

Sorry, I am not aware of how it actually works, don't have coding abilities.

I just don't want to see statistics for let's say images in my site, although they are actually downloaded on everybody's PC, when they load the page in their browser.
Title: Simple Download Monitor problems
Post by: pepak on July 01, 2010, 06:55:17 PM
It was a reasonable assumption and I will need to do something about it. But the primary purpose was security, not file selection - that is done by the .htaccess.
Title: Simple Download Monitor problems
Post by: MixMan on July 01, 2010, 09:32:54 PM
I see. Hm, do you think there's another solution for now? Like altering the .htaccess file to "process" only the desired file types? Or I am dreaming?
Title: Simple Download Monitor problems
Post by: pepak on July 02, 2010, 05:13:44 AM
For now? Change the .htaccess line from
RewriteRule ^(wp-content/uploads/.*) /index.php?sdmon=$1 [L]to
RewriteRule ^(wp-content/uploads/.*\.(pdf|gif|jpe?g|png)$ /index.php?sdmon=$1 [L]That should work.
Title: Simple Download Monitor problems
Post by: MixMan on July 02, 2010, 09:05:39 AM
I changed it and the site started giving me:

INTERNAL SERVER ERROR.

Also, I noticed that when I am using this line in .htaccess:

RewriteRule ^(wp-content/uploads/.*) /index.php?sdmon=$1 [L]
the images in my site stopped to show up. So now not only I am getting stats for all these other than MP3 files too (that I don't need, but my images don't work. I think I did a total mess with the settings :)

Switched off the plugin for now.
Title: Simple Download Monitor problems
Post by: pepak on July 02, 2010, 10:16:24 AM
Quote from: MixManI changed it and the site started giving me:

INTERNAL SERVER ERROR.
I forgot to add an ending parenthesis:
RewriteRule ^(wp-content/uploads/.*\.(pdf|gif|jpe?g|png))$ /index.php?sdmon=$1 [L]
Quote from: MixManthe images in my site stopped to show up. So now not only I am getting stats for all these other than MP3 files too (that I don't need, but my images don't work. I think I did a total mess with the settings :)
That is the expected behavior: You told SDMON to only allow files with mp3 extension, so it dutifully prevents access to files with other extensions. You need to expand the allowed extensions setting to allow for additional file types.
Title: Simple Download Monitor problems
Post by: JKirkby on July 25, 2010, 04:37:53 PM
I'm having the same problem as 'MixMan'

I only want to track MP3 downloads, but if I only track MP3 downloads, images don't appear on my site. If I add images to the "Allowed extensions" section, then image downloads appear in the download stats.

Most images on my site are inside the tag.

I've also added:
RewriteRule ^(wp-content/uploads/.*\.(pdf|gif|jpe?g|png))$ /index.php?sdmon=$1 [L]
to my .htaccess file, but it hasn't made a difference.

Thanks
Title: Simple Download Monitor problems
Post by: pepak on July 25, 2010, 04:45:52 PM
This comment should help you:
http://www.pepak.net/wordpress/simple-download-monitor-plugin/#comment-4729
Title: Simple Download Monitor problems
Post by: JKirkby on July 25, 2010, 05:06:32 PM
Quote from: pepakThis comment should help you:
http://www.pepak.net/wordpress/simple-download-monitor-plugin/#comment-4729

Thank you! problem solved!
Title: Simple Download Monitor problems
Post by: Sean on September 03, 2010, 07:11:05 AM
pepak -- great plug-in!!   Having slight difficulty getting it work.  

1) Using the 'www.mysite.com/index.php?sdmon=myfolder/myfile.zip (http://www.mysite.com/index.php?sdmon=myfolder/myfile.zip)' test works (file is registered as downloaded).  
2) Using 'www.mysite.com/myfolder/myfile.zip (http://www.mysite.com/myfolder/myfile.zip)' doesn't.. file download is not registered.
3) I verified that my webhost supports both user-defined .htaccess files and mod_rewrite.
4) The relevant part of my .htaccess file looks like this:

---
RewriteEngine on
RewriteBase /
RewriteRule ^(myfolder/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
-------

5) I verified that no other .htaccess files exists in any subs off the site root.
6) I verified that the extension for my downloadable filetypes (pdf) is included in the allowed extensions settings.
7) I'm puzzled!

Any advice is appreciated!

Sean
Title: Simple Download Monitor problems
Post by: pepak on September 03, 2010, 04:41:41 PM
Quote from: Sean1) Using the 'www.mysite.com/index.php?sdmon=myfolder/myfile.zip (http://www.mysite.com/index.php?sdmon=myfolder/myfile.zip)' test works (file is registered as downloaded).
Good. That means the plugin is installed and set up correctly.

Quote3) I verified that my webhost supports both user-defined .htaccess files and mod_rewrite.
Did you verify that mod_rewrite and .htaccess are supported or that they really work? It might seem like a meaningless distinction, but I have seen webhosts who "support" mod_rewrite provided that one or another condition is met, such as a tech support is contacted to turn the support on for a specific site.

E.g., if you turn on "cool URLs" for your site, do they actually work?

QuoteRewriteEngine on
RewriteBase /
RewriteRule ^(myfolder/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Looks OK to me.

Quote6) I verified that the extension for my downloadable filetypes (pdf) is included in the allowed extensions settings.
Did you try the actual .pdf with the /index.php?sdmon=something syntax? Did it work?

What kind of errors do you see? Do you get, e.g., a HTTP 500 error, a 404 error or something else completely?
Title: Simple Download Monitor problems
Post by: Sean on September 06, 2010, 09:43:26 PM
>> Did you verify that mod_rewrite and .htaccess are supported or that they really work?

Yep, supported by default according to my web host.

>> if you turn on "cool URLs" for your site, do they actually work?

Works, so mod_rewrite is working.

>>Did you try the actual .pdf with the /index.php?sdmon=something syntax? Did it work?

Works.

I suspect its a simple path issue with my .htaccess file.   After turning on cool-urls, WP altered the .htaccess files which gave me some clues.   Could you email me directly?   I'd like to pass you my full .htaccess file to see if you could shed light on the issue.

Thanks!

Sean
Title: Simple Download Monitor problems
Post by: pepak on September 06, 2010, 09:49:06 PM
I could e-mail you, if you provided an e-mail :-)

If you want to send me something, forum at pepak.net will work.
Title: Simple Download Monitor problems
Post by: Sean on September 06, 2010, 11:02:03 PM
Working now!   Was a path problem.   Thanks for the great plugin and support Pepak!

Sean
Title: Simple Download Monitor problems
Post by: pepak on September 07, 2010, 05:20:11 AM
Glad you found the cause!
Title: Simple Download Monitor problems
Post by: Raphael on November 05, 2010, 09:30:50 PM
Hi,

I encounter a very strange issue. Forwarding/Path rewriting works like a charm, but instead of offering my a download, FireFox (3.6.10) shows the file's contents. See for instance: http://lmazy.verrech.net/files/js_antics.tar.gz

My PHP verison is 5.1.2. Is a special library/module needed to have the plugin run? (if so, you should check for it)
Title: Simple Download Monitor problems
Post by: Raphael on November 05, 2010, 09:33:22 PM
Oh, and the button descriptions "Delete..." are misleasing. There is no reason whatsoever for the plugin not offering an option to delete files (might even be a feature idea?). Please relabel to "Reset ..."
Title: Simple Download Monitor problems
Post by: pepak on November 05, 2010, 10:35:25 PM
Raphael:

1) Firefox shows file contents because the file is set up to have content-disposition of "inline". That is caused by the setting "Inline files" in the plugin's config: apparently you set it up so that even js_antics.tar.gz matches it.

2) "Reset" instead of "Delete" sounds quite reasonable. I'll add that to my TODO list.
Title: Simple Download Monitor problems
Post by: Raphael on November 05, 2010, 10:49:03 PM
Thanks for pointing me into the right direction. Now I have a bug report for you: if nothing is entered into the inline option box, all files match and are shown inline. This is clearly counterintuitive if not unintended. Please check empty(trim(.)) and/or provide a meaningful default setting.

Thank you for your help and the plugin!
Title: Simple Download Monitor problems
Post by: pepak on November 06, 2010, 06:45:54 AM
That would certainly be unintended. I'll look into it.
Title: Simple Download Monitor problems
Post by: pepak on November 06, 2010, 11:54:57 AM
Raphael:

Actually, there IS a check for empty "Inline files" setting. My guess is that your setting IS NOT EMPTY. I am reluctant to test for empty(trim(...)), because I do want to be able to use the space, but I'll tighten the setting a little.
Title: Simple Download Monitor problems
Post by: Raphael on November 06, 2010, 02:38:52 PM
preg_match et al. are supposed to ignore whitespaces, are they not? I thought that was what \s was for.

Also, I fail to see in which way an empty/whitespace pattern can match everything.
Title: Simple Download Monitor problems
Post by: pepak on November 06, 2010, 02:43:31 PM
Quote from: Raphaelpreg_match et al. are supposed to ignore whitespaces, are they not?
Only in the extended mode.

QuoteI thought that was what \s was for.
Nope. "\s" is "any whitespace character", while " " is only a space.

QuoteAlso, I fail to see in which way an empty/whitespace pattern can match everything.
Because PCRE expressions have a form of:
separator - expression - separator - modifiersIf you provide two spaces, a space will be separator and empty string will be expression. And apparently any input matches an empty expression.

I am not sure how do PCRE in PHP behave if you use only one space. I would expect that an error would occur, but maybe not.
Title: Simple Download Monitor problems
Post by: Piet on November 08, 2010, 04:16:56 AM
Hi Pepak,

I had your plugin working before, but now it doesn't anymore, so I am trying to figure out what the problem is.

The problem is most likely with my htaccess file, but I cannot discover the culprit.

What I did find out though is that when I do not place an additional htaccess file in the downloads folder all that shows up when I click a download link is gibberish.

I am using nice permalinks, so rewrite is not the problem.

If is use the long url to download the files your plugin registers the download. If I am using my own url site.com/downloads/filename.zip your plugin does not registers the download

My htaccess file contains a few more entries, could that have something to do with it?

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php

# Redirect old PDF files to Tutorials directory (http://www.webweaver.nu/html-tips/web-redirection.shtml)
RedirectMatch 301 (.*)\.pdf$ http://sub.domain.com/folder/

# PROTECT htaccess file

 order allow,deny
 deny from all

#END

# PROTECT wpconfig.php

order allow,deny
deny from all

#END

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(downloads/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC]
RewriteRule \.(pdf)$ - [F]
Title: Simple Download Monitor problems
Post by: Piet on November 08, 2010, 04:19:42 AM
oh, and the contents of the additional htaccess in the downloads folder are:

# INITIALISE AND ENABLE REWRITE ENGINE
RewriteEngine on
#END

# DISABLE DIRECTORY BROWSING
# For security reasons, Option all cannot be overridden.
#Options All -Indexes
Options ExecCGI  Includes  IncludesNOEXEC  IncludesNOEXEC  MultiViews  SymLinksIfOwnerMatch  Indexes -Indexes
#END
Title: Simple Download Monitor problems
Post by: Piet on November 08, 2010, 04:23:32 AM
OK you can forget about both my posts above, for some *magical* reason all of a sudden it is working.

Still don't know why it wasn't before, but it is now, so all good.
Title: Simple Download Monitor problems
Post by: pepak on November 08, 2010, 06:31:49 AM
One thing to keep in mind whenever you encounter a problem with SDMon: First thing to try is a "direct" link in the form of mywebsite.com/index.php?sdmon=files/path/name.zip. If it works, then the problem is with the .htaccess file. If it doesn't work, the problem is with SDMon configuration.
Title: Simple Download Monitor problems
Post by: Carsten Lippert on November 16, 2010, 09:21:34 AM
Hello,

when I try the direct-link http://www.1050-jahre-eilenburg.de/index.php?sdmon=files/logo_4c.zip I get the following output:

Warning: finfo_open() expects parameter 1 to be long, string given in /home/www/kunden/buergerhaus-eilenburg.de/1050/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 329

Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/www/kunden/buergerhaus-eilenburg.de/1050/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 330

Warning: Cannot modify header information - headers already sent by (output started at /home/www/kunden/buergerhaus-eilenburg.de/1050/wp-content/plugins/simple-download-monitor/simple-download-monitor.php:329) in /home/www/kunden/buergerhaus-eilenburg.de/1050/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 253

and three more more Warnings "Cannot modify header information" and then the binary content of that file.

I am not sure what is wrong.
In my .htaccess the following is written:

  Order Allow,Deny
  Deny from all



  SetHandler x-httpd-php5



RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(files/.*) /index.php?sdmon=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


The SetHandler I need for PHP5 (I use Wordpress 3.0.1, which need PHP5).

Do you have any idea?

Thanks a lot.

cl
Title: Simple Download Monitor problems
Post by: pepak on November 16, 2010, 09:42:07 AM
Quote from: Carsten LippertHello,

Warning: finfo_open() expects parameter 1 to be long, string given in /home/www/kunden/buergerhaus-eilenburg.de/1050/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 329

[...]

Do you have any idea?
My guess is that you use a very new or a very old PHP version, or it's configured in an unusual way: I am calling finfo_open() with a FILEINFO_MIME_TYPE constant, which should translate to a number as per PHP's requirements. But apparently it translates to a string instead. That almost certainly means that the constant is not defined at all, and PHP treats undefined constants as if they were strings instead. You could use a script like this to confirm this theory:


I have no idea how it could happen for this constant to be undefined - perhaps finfo functions are not compiled into your PHP? You'll need to inquire with your webhoster about that.
Title: Simple Download Monitor problems
Post by: Carsten Lippert on November 17, 2010, 09:51:30 AM
Hello,

I put this code

in a file and the output is
Value of constant FILEINFO_MIME_TYPE is: FILEINFO_MIME_TYPE

So I dont know, if this is right. I think it isnt.

Look at http://www.carli.de/temp.php

hg Carsten Lippert
Title: Simple Download Monitor problems
Post by: pepak on November 17, 2010, 10:25:32 AM
That confirms my suspicion. For some reason, FILEINFO_MIME_TYPE constant is not defined on your server.

And the look into the PHP documentation reveals that this constant is available for PHP 5.3.0 and newer. I will write some workaround. Until that is done, you can comment-out lines 329 and 330 in simple_download_monitor.php (version 0.17).
Title: Simple Download Monitor problems
Post by: Carsten Lippert on November 17, 2010, 03:18:21 PM
Prima, now it works.

Thanks a lot.

Carsten Lippert
Title: Simple Download Monitor problems
Post by: Raffaele Gambelli on December 08, 2010, 02:20:46 PM
Hi,
i installed your plugin and initially it worked fine, after some minutes I tried again doing a download and the following message appeared:



Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 41318401 bytes) in /web/htdocs/www.mysite.it/home/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 258


From that, no download works anymore and so I removed the "magic" line from .httaccess restoring the normal download...

Is it possible that a cms like wordpress hasn't a good plugin for download monitoring, I tried all of them, found one or more bug after some minutes from their activation, incredible...

thanks and best regards
Raffaele
Title: Simple Download Monitor problems
Post by: pepak on December 08, 2010, 02:59:46 PM
It seems it may be a problem with your webserver's configuration and/or PHP. There is a tip in the PHP documentation that may work - try to change line 258 in simple-download-monitor.php file from
readfile($filename);
to:
ob_end_flush(); readfile($filename);

If it works, I will add it to the official version.
Title: Simple Download Monitor problems
Post by: hnrch on March 04, 2011, 04:42:19 AM
Well finally I got this plugin working correctly, the current environment is:

- My website is installed at  /wordpress/ (as you can see, is not "root path")
- I used .htaccess to open my web at www.domain.com (http://www.domain.com) instead of www.domain.com/wordpress/ (http://www.domain.com/wordpress/)
- I'm using permalinks like this: www.domain.com/%postname%/ (http://www.domain.com/%postname%/)
- My downloads folder is at /files/ (outside of wordpress installation)

Sincerely I tried lot's of  combinations in configuration, option values etc etc etc, that I can't remember what I have done, but I will share the two changes I have done in simple-download-monitor.php:

- First Change: In function Download(), ABSPATH was pointing inside /wordpress/ so realpath() was returning false, so I added the following code after the $fullfilename and $relfilename value assignation.

if ( ! $fullfilename ) { // If WP installation is not at root    
    $fullfilename = realpath($_SERVER['DOCUMENT_ROOT'] . '/' . $filename);
    $relfilename = substr($fullfilename, strlen($_SERVER['DOCUMENT_ROOT']));
}

and now that section looks like this;

// Normalize the filename
$fullfilename = realpath(ABSPATH . '/' . $filename);
$relfilename = substr($fullfilename, strlen(ABSPATH));
if ( ! $fullfilename ) { // If WP installation is not at root    
    $fullfilename = realpath($_SERVER['DOCUMENT_ROOT'] . '/' . $filename);
    $relfilename = substr($fullfilename, strlen($_SERVER['DOCUMENT_ROOT']));
}
$relfilename = strtr($relfilename, '\\', '/');
$exists = (file_exists($fullfilename) AND !is_dir($fullfilename)) ? 1 : 0;

- Second Change: I just modified the regular expression in the $dirregexp value assignation, replacing '^' with '^\/?', so the code looks like this:

// Make sure it is a valid request
$dirregexp = self::PREG_DELIMITER . '^\/?' . get_option(self::PREFIX . 'directories') . self::PREG_DELIMITER;
$extregexp = self::PREG_DELIMITER . '\\.' . get_option(self::PREFIX . 'extensions') . '$' . self::PREG_DELIMITER;
$valid = (preg_match($dirregexp, $relfilename) AND preg_match($extregexp, $relfilename)) ? 1 : 0;

This is because relative path might start with or without a slash.

Well I hope this helps to somebody else, and I suggest this to be added in the next versions of the plugin, by the way just want to say that is a nice plugin. :)

P.D. Sorry for my bad english, I'm mexican.
Title: Simple Download Monitor problems
Post by: pepak on March 04, 2011, 06:32:02 AM
Quote from: hnrch- My downloads folder is at /files/ (outside of wordpress installation)
Yeah, this would be a problem.

Quote- First Change: In function Download(), ABSPATH was pointing inside /wordpress/ so realpath() was returning false, so I added the following code after the $fullfilename and $relfilename value assignation.
Seems reasonable.

Quote- Second Change: I just modified the regular expression in the $dirregexp value assignation, replacing '^' with '^\/?', so the code looks like this:
I will need to think about this change a little. It seems to me it may be a better idea to have $relfilename always without the leading slash.

Thanks for the improvement. I'll add it to SDMon.
Title: Simple Download Monitor problems
Post by: Malcev on March 14, 2011, 04:42:41 AM
Hi!
Thank You for this plugin.
I use this plugin to get information how many people watch my video (flv format)
But I have PHP/5.2.6
And I get those errors

Warning:  Cannot modify header information - headers already sent in /home/zvezdole/zvezdolet.lv/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 257



Warning:  Cannot modify header information - headers already sent in /home/zvezdole/zvezdolet.lv/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 258



Warning:  Cannot modify header information - headers already sent in /home/zvezdole/zvezdolet.lv/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 259



Warning:  Cannot modify header information - headers already sent in /home/zvezdole/zvezdolet.lv/wp-content/plugins/simple-download-monitor/simple-download-monitor.php on line 261


What can I do to make this work
My be I can write something in php.ini?
Thank You!
Title: Simple Download Monitor problems
Post by: pepak on March 14, 2011, 05:19:56 AM
It seems some other plugin interferes with SDMon by writing output first. It's hard to suggest a fix without knowing which plugin is the culprit (you can find it by deactivating plugins one after another until the messages stop appearing), but it is likely that activating a cache plugin such as W3 Total Cache would help.
Title: Simple Download Monitor problems
Post by: Malcev on March 14, 2011, 07:46:17 AM
Thank You!
You are right.
I disable WP Super Cache and your plugin starts to work.
As I understand they can not work together?
Title: Simple Download Monitor problems
Post by: pepak on March 14, 2011, 07:59:25 AM
They should. I specifically added some code in the last version which should make it compatible with caching plugins, and SDMon if fact does work with W3 Total Cache. As I don't use WP Super Cache, I didn't test it, but I thought my fix is pretty universal. At the moment I don't know what else to do to improve the compatibility. (More exactly: I know what to do in theory, but I don't know how to do it...) Just one possible thing: Try to remove /index.php from caching. I believe W3 Total Cache does that automatically.
Title: Simple Download Monitor problems
Post by: Malcev on March 14, 2011, 08:51:58 AM
Nothing helps with WP super cache.
Uninstall it and install W3 Total Cache.
It works without those errors but there is an error with flv-player.
When I hit button play time indicator of flash player goes to very end as if the movie completely has downloaded
To correct it I turn off "Enable HTTP (gzip) compression"  in Browser Cache settings.
Now it works.
Thank You!
Title: Simple Download Monitor problems
Post by: pepak on March 14, 2011, 09:07:16 AM
I still think it should work fine even with gzip compression and WP super cache. Please make sure you really are using SDMon version 0.18 - there were some problems between W3TC and older versions of SDMon, but they should be fixed in 0.18.
Title: Simple Download Monitor problems
Post by: Malcev on March 14, 2011, 10:05:17 AM
Yes, I use Simple Download Monitor  0.18.
With  wp super cache when I push play button it writes me that he could not find video 404 error.
But with http watcher i have seen that video downloads
Title: Simple Download Monitor problems
Post by: Holly on June 09, 2011, 12:07:33 AM
I would love to install and use your plug-in. However, I have the DAP {Digital Access Pass} plug-in installed, which is a membership site and it is already redirecting things using the .htaccess file.  I was told by DAP that I cannot edit the .htaccess file as you need for the SD Monitor plug-in to work.  

Is there any way that you can see to track downloads from a certain folder without the need to edit the .htaccess file?  I really need  to be able to see the # of times a file is downloaded, who has downloaded it, and when.  

Please help!  Thank you very much!!
Title: Simple Download Monitor problems
Post by: pepak on June 09, 2011, 05:26:09 AM
There is a way, but you would need to sacrifice the main feature of SDMon - its ability to work without modifying anything.

If you can modify .htaccess, you use URLs such as /files/youtube/ytd-0.84.zip. To switch to a htaccess-less SDMon, you would have to change the URLs to /index.php?sdmon=files/youtube/ytd-0.84.zip.
Title: Simple Download Monitor problems
Post by: Radio on June 11, 2011, 03:52:01 PM
Hi,
I'm experimenting problem with Simple File Manager and symbolic links.

The issue is around lines 300-308 of simple-download-monitor.php when $relfilename is defined as substr of $fullfilename. That's misleading when symbolic link are involved since realpath() returns, as it's name suggests, the *real path* (ex. /home/user/file.txt) which brings the download to be marked as invalid...

To be sincere I'm experimenting  the symbolic link's problem only in my test environment, on the production website I don't expect (haven't tried yet) any kind of trouble (since no links are involved there), so it's not a big deal for me, nevertheless I'm trying to find out a viable solution since it could be usefull for others, that's also why I'm writing here now ;)
Title: Simple Download Monitor problems
Post by: pepak on June 12, 2011, 05:08:11 PM
Sorry, my experience with symbolic links on the web is nonexistent and I have no server on which to test it. The code around realpath is required to prevent security issues from malformed requests (e.g. attacker trying to read wp-config.php).
Title: Simple Download Monitor problems
Post by: Jamie on August 16, 2011, 12:02:37 AM
The plugin does not restrict user access to members only.. it lets anyone download.  I have a potential idea for the cause.  My files are located in subdirectories of the files directory.  Do I need to add a rule for each subdirectory to .htaccess for this to work?
Title: Simple Download Monitor problems
Post by: pepak on August 16, 2011, 05:54:55 AM
That is intentional, as I never had a need for limiting access. It may appear in some future version.

No, you don't need to add each subdirectory to .htaccess. The main one (files/) is sufficient.
Title: Re: Simple Download Monitor problems
Post by: ionelpaun on March 21, 2012, 01:16:06 PM
Hello Pepak, I've tried over 100 posibility to make this plugin to work, but without any result, can you help me please. I think your plugin is very useful for me.

So, I've attached here 3 images, one with config panel from Wordpress, second with root of my host and 3rd with .htaccess file to view the lines .

I need this work in my www.smartylogo.com/member/ - in this /members/ subdirectory have another wordpress installed.

Please let me know what's wrong in this case and make this workable,

Best Regards, I am looking forward to your answer.

Ionel
Title: Re: Simple Download Monitor problems
Post by: ionelpaun on March 21, 2012, 01:18:09 PM
I need this work in my
www.smartylogo.com/members/ in last post I missed the last "s" from members.

was a mistake in last post.

- in this /members/ subdirectory have another wordpress installed.
Title: Re: Simple Download Monitor problems
Post by: pepak on March 21, 2012, 06:18:01 PM
Quote from: ionelpaun on March 21, 2012, 01:16:06 PM
Hello Pepak, I've tried over 100 posibility to make this plugin to work, but without any result, can you help me please. I think your plugin is very useful for me.
First things first: Did you try to use a "direct SDMon link" such as http://www.smartylogo.com/members/index.php?sdmon=wp-content/plugins/s2member-files/some-file.zip? What was the result?

a) Download works - then the problem lies in your .htaccess file and I am afraid I won't be able to help much as I am not very good at .htaccess.

b) Download doesn't work - then the problem lies in your SDMon configuration. I suspect the problem might be caused by the fact that you use the /members directory for your WordPress install. You may want to try to add members/ to the beginning of your "allowed directories" option. (Which reminds me, is your "allowed extensions" setting correct?)
Title: Re: Simple Download Monitor problems
Post by: ionelpaun on March 22, 2012, 11:35:01 AM
Hello there,
When I try with this direct link, http://www.smartylogo.com/members/index.php?sdmon=wp-content/plugins/s2member-files/somefile.zip
it works, Simple Download Monitor record this download in status.


But, in config menu at the allowed directories I have "wp-content/plugins/s2member-files/" - download works

If I put in the allowed directories "members/wp-content/plugins/s2member-files/" the direct link download doesn't work, it appear with SDmon Download Error.

Do you have another suggestion ?
Thank you very much.
Title: Re: Simple Download Monitor problems
Post by: ionelpaun on March 22, 2012, 04:20:13 PM
and at the allowed extensions I've put only "zip" for zip files.

best regards,

Title: Re: Simple Download Monitor problems
Post by: pepak on March 22, 2012, 06:48:53 PM
Since the index.php?sdmon link works, that confirms that your SDMon config is correct. The problem lies in your .htaccess file, and as I mentioned above, I am afraid I won't be able to help you with that. But I suspect that if you look at your webserver's logs, you will see the reason - probably you will see that the URL http://www.smartylogo.com/members/wp-content/plugins/s2member-files/some-file.zip doesn't get rewritten to http://www.smartylogo.com/members/index.php?sdmon=wp-content/plugins/s2member-files/some-file.zip as it should, but to something else. If it idn't this obvious, you will need to locate someone good with .htaccess, and unfortunately that group doesn't include me :-( (but at least now you know where to look for the cause of the problem).
Title: Re: Simple Download Monitor problems
Post by: djrichiep on May 16, 2012, 04:38:52 PM
I was able to successfully install and configure SDMON with no problems. And, this plugin is something I would dearly love to have working on my site to gather stats for me. However, after installing, I began to get complaints from readers of incomplete downloads. I provide large rar archive files to my readers in sizes ranging from 100-500mb. Files would download and would finish as complete but, when trying to extract the archive an error would come up that the file wasn't complete. I had numerous complaints from readers with the same issue. Since SDMON was the last plugin I had loaded to my site, I disabled it and removed the reference for it from the .htaccess file. Upon doing so, the problem went away.  After reading here, I am using WP Super Cache, a possible conflict?  Although, my downloads folder isn't technically part of the Wordpress installation.  Should I try disabling WP Super Cache?   Are there any additional parameters I can add in .htaccess or in the SDM settings to keep this issue from happening? I would love to be able to re-activate this plugin as it is exactly what I was looking for to monitor downloads. Thanks
Title: Re: Simple Download Monitor problems
Post by: pepak on May 16, 2012, 05:02:18 PM
Quote from: djrichiep on May 16, 2012, 04:38:52 PMAfter reading here, I am using WP Super Cache, a possible conflict?
It is possible, but it doesn't sound very likely. I would think the SDMon's download-resuming code to be more likely a culprit. It might be a good idea to try some downloads with a regular browser, not a download manager, and check whether the completed downloads (those which downloaded without having to resume) unpack correctly. Also, a comparison of a downloaded file to the original file would be a good source of info.

QuoteAre there any additional parameters I can add in .htaccess or in the SDM settings to keep this issue from happening? I would love to be able to re-activate this plugin as it is exactly what I was looking for to monitor downloads. Thanks
The only thing I can think of off the top of my head is to disable the support for download resuming and see what happens.

One user proposed a change which might also help in this situation, but I have been very busy since then and unable to implement it to my satisfaction. I should be more free in a month or so, and plan to look into it then.
Title: Re: Simple Download Monitor problems
Post by: Floris on September 19, 2012, 12:39:06 PM
Hi,

First, thanks for creating such a handy plugin :)

I have been using it for some months now and it worked perfectly, until a few days a go (September 9th).. It just stopped counting. Now, I am no WP wizard, just a graphic designer (I have somebody to handle my technical wp things for me), but I am curious if there are any known issues which could have caused this.

Cheers,
Floris
Title: Re: Simple Download Monitor problems
Post by: pepak on September 19, 2012, 01:54:54 PM
None that I am aware of. The date it stopped working for you is close enough to the date a new version of the plugin was released, but I have not received another complaint yet, so presumably this might really be coincidental. You might try the previous version of SDMon just to be certain, though.
Title: Re: Simple Download Monitor problems
Post by: Rony on October 17, 2012, 06:04:47 PM
Hi and thank you for the plugin.
Is there a way to show the file download count to visitors?

Thank you.
Title: Re: Simple Download Monitor problems
Post by: pepak on October 17, 2012, 07:57:18 PM
No. Only a top-ten via a sidebar plugin, but not a specific per-file count - while that value is stored, there is no easy way to access it (basically, it would require a code in the post, and that would go contrary to what SDMon is all about).
Title: Re: Simple Download Monitor problems
Post by: lucas on November 24, 2012, 03:37:50 PM
hi
why when i use this plugin (it works) but i cant list the "monitored" directory, i can download by useing direct link exampple /tmp/download1.zip but i cant list the /tmp becouse i get error: Simple Download Monitor error

Requested file tmp/ not found.

htaccess is edited, everything work well but no listing...
Title: Re: Simple Download Monitor problems
Post by: pepak on November 25, 2012, 08:07:52 AM
You could probably make this work by using a different content of .htaccess file, but I am not expert enough to tell you how to do it.
Title: Re: Simple Download Monitor problems
Post by: harisn on December 29, 2012, 06:14:54 PM
Is this plugin fully compatible with nginx web server? I'd like to use this plugin on a high-traffic website and need to make sure everything works great.
Title: Re: Simple Download Monitor problems
Post by: pepak on December 29, 2012, 07:41:13 PM
It's OK to post just to the plugin's page. In fact, it's better, because it notifies me of new posts while the forum doesn't.

As I replied there, I have no idea how compatible it is with nginx. This is the first time I have even heard about that server. If the server is compatible with Apache, SDMon should work fine.