Author Topic: Simple Download Monitor problems  (Read 81436 times)

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #60 on: September 03, 2010, 04:41:41 PM »
Quote from: Sean
1) Using the '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.

Quote
3) 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?

Quote
RewriteEngine 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.

Quote
6) 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?

Sean

  • Guest
Simple Download Monitor problems
« Reply #61 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

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #62 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.

Sean

  • Guest
Simple Download Monitor problems
« Reply #63 on: September 06, 2010, 11:02:03 PM »
Working now!   Was a path problem.   Thanks for the great plugin and support Pepak!

Sean

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #64 on: September 07, 2010, 05:20:11 AM »
Glad you found the cause!

Raphael

  • Guest
Simple Download Monitor problems
« Reply #65 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)

Raphael

  • Guest
Simple Download Monitor problems
« Reply #66 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 ..."

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #67 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.

Raphael

  • Guest
Simple Download Monitor problems
« Reply #68 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!

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #69 on: November 06, 2010, 06:45:54 AM »
That would certainly be unintended. I'll look into it.

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #70 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.

Raphael

  • Guest
Simple Download Monitor problems
« Reply #71 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.

pepak

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 961
    • View Profile
    • Pepak.net
Simple Download Monitor problems
« Reply #72 on: November 06, 2010, 02:43:31 PM »
Quote from: Raphael
preg_match et al. are supposed to ignore whitespaces, are they not?
Only in the extended mode.

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

Quote
Also, I fail to see in which way an empty/whitespace pattern can match everything.
Because PCRE expressions have a form of:
Code: [Select]
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.

Piet

  • Guest
Simple Download Monitor problems
« Reply #73 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]

Piet

  • Guest
Simple Download Monitor problems
« Reply #74 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

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Note: this post will not display until it's been approved by a moderator.
Name: Email:
Verification:
This box must be left blank:

Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture: