• Resolved polanskiman

    (@polanskiman)


    Hello,

    I have used Simple Download Monitor for several years without a problem. Download links have always worked on all browsers. I was recently informed that my download links were not working anymore. After some digging I noticed that the links were only working when using Safari but not with other browsers such as Firefox, Chrome, Opera etc. After hours of trying to debug this it looks like the issue is caused by the “PHP Dispatch or Redirect” feature. If I disable it, downloads start working again on all browsers. However, the thing is that this feature has always been enabled and I have not modified anything on my website for several months so I can only attribute this issue to one of the latest updates from Simple Download Monitor or from WordPress. The problem seems related to CORS restrictions but I can’t be sure.

    Any help would be appreciated.

    Thank you.

    • This topic was modified 1 year, 3 months ago by polanskiman.
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us.

    Download links have always worked on all browsers.

    Are you talking about physical links? If not can you provide more information.

    The reason why I am asking is because I carried out a test in my dev site using a download button with the same feature “PHP Dispatch or Redirect” enabled and it worked for me. I tested this using the following browsers.

    • 1-Google Chrome
    • 2-Microsoft Edge
    • 3-Firefox
    • 4-SeaMonkey
    • 5-DuckDuckGo

    So I can confirm that it is working for me using a download button. There might be a conflict with your theme or a plugin in your site. Please carry out the following troubleshooting steps.

    https://simple-download-monitor.com/forums/topic/test-for-plugin-and-theme-conflict-before-posting-an-issue-or-a-bug/

    If the step above does not help, can you ask your host if they have made any changes to your server prior to this issue happening in your site.

    Kind regards.

    Thread Starter polanskiman

    (@polanskiman)

    Hello,

    Thank you for the reply.

    I disabled all pluggins except Simple Download Monitor and problem still persist. I then used a default WordPress theme with all other pluggins also disabled and same problem.

    I will ask the host and revert back.

    Thank you.

    Best regards.

    Thread Starter polanskiman

    (@polanskiman)

    After talking with the support of the hosting company we figured that the problem seems to be coming from an incompatibility of the plugin with the latest update of WordPress (6.7.2). We reverted to WP 6.7.1 and everything is working fine now. So perhaps the devs might want to have a look at “PHP Dispatch or Redirect” feature under WP 6.7.2.

    Best regards.

    Thread Starter polanskiman

    (@polanskiman)

    And here is some additional information for the devs.

    After I restored WP to 6.7.1, I updated Simple Download Monitor to v.3.9.28 since I had v.3.9.25 in my back up. After updating the plugin I experienced the same link issue. So I rolled back to v.3.9.27 and again same issue. I rolled back one more version to v.3.9.26 and links are working again. So it seems the problem is coming since v.3.9.27. When looking at the change log of that version I see the following:

    3.9.27
    Download process request is now handled using the ‘wp’ hook.

    Maybe something related to that?

    • This reply was modified 1 year, 3 months ago by polanskiman.
    Plugin Contributor mbrsolution

    (@mbrsolution)

    Unfortunately I cannot reproduce this issue myself using a download button. Are you by any chance using the option as per the documentation below?

    https://simple-download-monitor.com/direct-download-link-creation/

    Kind regards.

    Thread Starter polanskiman

    (@polanskiman)

    Not sure I understand. Using what option?
    Below is the link. It currently works as I have downgraded the pluggin to 3.9.26. Any higher version and links will fail to works on the above mentionned browsers:

    https://www.paullefevre.com/?sdm_process_download=1&download_id=1197

    Accessible here: https://www.paullefevre.com/ifc/

    • This reply was modified 1 year, 3 months ago by polanskiman.
    Plugin Contributor mbrsolution

    (@mbrsolution)

    Not sure I understand. Using what option?

    The option displayed in the link I shared above using a physical link. The reason why I asked you was because my test above was based on a button and not a physical link.

    Now, I have carried out another test but this time using a physical link and it works for me in my dev site. I also used the same browsers mentioned above for testing purposes without any issues.

    My WordPress version is 6.7.2. My PHP version is 8.2.12.

    Unfortunately I cannot reproduce the same error in my dev site as you have. It works well in my environment.

    Kind regards.

    Thread Starter polanskiman

    (@polanskiman)

    I am unsure what the issue is but my PHP version supersedes the one you have. I tried downgrading the PHP to several earlier versions to test but still got the same problem.

    I am stuck at the pluggin version 3.9.26. Anything above will disallow file downloads if PHP Dispatch or Redirect is enabled.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Unfortunately there is not much more I can do in this forum to help you. However, I have submitted a message to the developers to investigate further your issue.

    Kind regards.

    Thread Starter polanskiman

    (@polanskiman)

    Thank you very much. Appreciate the help.

    Hi Are you using any addons of the Simple Download Monitor plugin by any chance? If you are, please let me know which one(s).

    Side Note: I personally tested the PHP dispatch feature with the latest versions of WordPress and the Download Monitor plugin across various server configurations, and it worked fine. This suggests that the issue on your site is likely due to a conflict with another component. While you noticed the issue after upgrading the plugin, that doesn’t necessarily mean the update caused it. If this were a widespread problem, we would have seen reports from many other users. Since the PHP dispatch feature is highly dependent on the server environment, it may not work on certain servers.

    Thread Starter polanskiman

    (@polanskiman)

    I am not using any addon.

    The PHP dispatch feature works fine up until 3.9.26 for me so I will remain on that version until I know what the problem is. Would there be any PHP variable that would need to be enabled for the feature to work properly? Anywhere else I could look at?

    Thank you.

    The key change in that version that could potentially have an impact is the following:

    Download process request is now handled using the 'wp' hook.

    Previously, the download request was processed at the ‘init’ stage, where not all WordPress functions were available. It is now handled at the ‘wp’ stage to support the enhanced file download protection feature recently added to the plugin.

    https://simple-download-monitor.com/enhanced-file-protection-securing-your-downloads/

    Thread Starter polanskiman

    (@polanskiman)

    Yes that’s what I supected as well.

    So reading through that link this is clearly a limitation from the plugin not working on all environments yet.

    • This reply was modified 1 year, 3 months ago by polanskiman.

    When using PHP streaming for downloads, there is no universal method that works seamlessly across all server environments. The ability for PHP to handle file streaming depends on the server’s configuration, including factors like PHP execution mode, timeout settings, and security restrictions. If PHP streaming isn’t working on your setup, the best approach is to contact your hosting provider and request adjustments to the server environment to allow PHP-based file streaming to function correctly.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Downloads not working when PHP Dispatch or Redirect enabled’ is closed to new replies.