When I updated my WordPress and my PHP the plugin broke. It would not even activate any longer. After some looking around I made some chnages in the string.php file. There are 3 lines that use the curly brackets {}. These have been depricated and now use the square brackets [].
In my editor, they were lines 40, 46 and 49.
This fixed it for me.
]]>Hello
I am using your lovely DL codes plugin since forever, but somehow having an issue with my new release.
I added 300 codes for the new release, but when entering these codes, they send me to my first release ever which is wrong.
Not sure why.
My new release is called BlueBox, however if I click “Manage codes” for this release, The release title is showing as: Elad Magdasi – BlueBox (Elad Magdasi – Hold The Night (Black Mirror Park) (MASTERED).wav) [ID: 17]
Which is a strange combo of some names of other releases as well.
I tried to manually add the codes to the the release by pasting the codes into the import codes section, but I’m getting this error:
Fatal error: Uncaught Error: Call to undefined function split() in /home/customer/www/frontleftrecords.com/public_html/wp-content/plugins/wp-download-codes/includes/helpers/db.php:322 Stack trace: #0 /home/customer/www/frontleftrecords.com/public_html/wp-content/plugins/wp-download-codes/includes/admin/manage-codes.php(75): dc_import_codes(’17’, ”, ‘FLRBBX126UT\r\n\r\n…’) #1 /home/customer/www/frontleftrecords.com/public_html/wp-includes/class-wp-hook.php(310): dc_manage_codes(”) #2 /home/customer/www/frontleftrecords.com/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array) #3 /home/customer/www/frontleftrecords.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/customer/www/frontleftrecords.com/public_html/wp-admin/admin.php(259): do_action(‘download-codes_…’) #5 {main} thrown in?/home/customer/www/frontleftrecords.com/public_html/wp-content/plugins/wp-download-codes/includes/helpers/db.php?on line?322
any ideas what can I do?
Thanks a lot for making this amazing tool
]]>Has anyone successfully updated this plugin to work with PHP 8.2? I’ve gone through all the code updates in the forum, but I’m still getting critical errors…
]]>Hello,
I’m using the Download Codes plugin with the same self-hosted files successfully for many years now. Recently however, attempts to download files are rejected with an error. The code itself works and the download link is displayed (/?lease=...
), however when clicking it users get an error:
This site can’t be reached
The web page at https://www.example.com/?lease=******* might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE
After that it redirects again to a page saying:
Error establishing database connection
This happens with all downloads. It is likely not a WP issue as other pages and functions on the site are working fine.
I’ve verified that the files are located where they should be and that sufficient permissions are granted.
I’ve also made sure the database is up and has enough disk space.
The edit screen on the plugin settings also shows the files correctly.
WP version 6.2
Download Codes version 2.5.4
]]>Hi there
I had to update my website from PHP 7.4 to PHP 8.0.
But now Download-Codes doesn’t work anymore.
Is there a version for PHP 8.0 or higher?
Thanks!
I’ve used the plugin for years and it has always worked. A few weeks ago I completely redesigned the website. So I wanted to import existing codes. As soon as I want to do that I get a critical error. I then receive the following information by email:
Fehlermeldung: Uncaught Error: Call to undefined function split() in /www/htdocs/w0087d0d/bewie-bauer.de/wp-content/plugins/wp-download-codes/includes/helpers/db.php:322
Stack trace:
#0 /www/htdocs/w0087d0d/bewie-bauer.de/wp-content/plugins/wp-download-codes/includes/admin/manage-codes.php(75): dc_import_codes(‘2’, ”, ”)
#1 /www/htdocs/w0087d0d/bewie-bauer.de/wp-includes/class-wp-hook.php(308): dc_manage_codes(”)
#2 /www/htdocs/w0087d0d/bewie-bauer.de/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)
#3 /www/htdocs/w0087d0d/bewie-bauer.de/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /www/htdocs/w0087d0d/bewie-bauer.de/wp-admin/admin.php(259): do_action(‘download-codes_…’)
#5 {main}
? thrown
How can the problem be solved?
Is there another plugin that is similarly simple and where I can import codes?
]]>Fatal Error:
Got error ‘PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in
/wp-content/plugins/wp-download-codes/includes/helpers/string.php on line 49
There is a few lines referencing curly brackets
$string = $chars{rand(0, $chars_length)};
Just need to be updated to:
$string = $chars[rand(0, $chars_length)];
After addressing those the site works again, still checking for any other issues.
Thank you
]]>I’ve had customers alert me that downloads are not working. I’ve tested and come to the same conclusion. Each attempt counts toward the three download attempts, but every time no file gets downloaded.
I get this error:
This site can’t be reachedThe webpage at https://domain-redacted.com/?lease=dbc53e7b5c9d8e2d763196e1d1caf691 might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE
WordPress 5.7.2
Server running PHP version: 7.3.27.
I also can no longer reset codes.
]]>Hey community!
Has anyone tried to run WP Download Codes with the latest WP version (5.7)?
Will this handy plugin be updated in the near future?
Thanks in advance!
]]>hello I want to know if it is possible for this plugin to work on wp 5.6
thanks.
]]>Hi!
After a painstaking search operation I realised that the Smart Slider 3 has serious incompatibility issues with the WP Download Codes plugin. So I deleted that and now the WP Download Codes 2.5.4 version seems to function without any errors!
Just as a word of warning. In case you are experiencing problems try to disable other plugins one by one.
]]>This plug-in has worked great for almost a year, an then all of a sudden I’m getting reports from customers of their downloads repeatedly timing out and then getting the “maximum number of downloads reached” message after three unsuccessful attempts. I tried using a fresh code myself and had the same problem. The download link appears after entering the code, but after I click on the download link it just spins wheels and never downloads (Safari) or spins wheels for a while and then says “unable to reach server” (Chrome). I notice the plug-in hasn’t been tested for the newest version of WordPress. Is there a new version of the plug-in planned soon? Anything I can do to get it working again in the meantime?
Thanks,
Tim
Hi!
When I update to WordPress to 5.5.1 the pop up window to view codes and manage them does not appear. The codes do list above the page when I click “list codes” and below when I click “View report”.
But with “View report” I’m not seeing the checkboxes to reset codes so it’s a bit of a problem.
I can see an error in the Safari debugger window that reads:
Wp-download-codes.js
Line 69:28 $(“#overlay”).show().live is not a function. ETC….
Google Chrome debugger reads:
Wp-download-codes.js?ver=5.5.1:69
Uncaught TypeError:
$(…).show(…).live is not a function
at openLightbox (wp-download-codes.js?ver=5.5.1:69)
at HTMLAnchorElement.<anynomous> (wp-download-codes.js?ver=5.5.1:69)
at HTMLAnchorElement.dispatch (load-scripts.php?c=0.e.utils&ver=5.5.1:3)
at HTMLAnchorElement.r.rhandle (load-scripts.php?c=0.e.utils&ver=5.5.1:3)
I had this problem before but @miroh did a version to github that fixed the issue, now it appeared again when I updated my WordPress to 5.5.1. This happens with both WP Download codes version 2.5.4 and 2.5.3.1.
Anyone with a hint what I could try to do to fix this?
]]>I was wondering if there was any interest in adding an email field so you can capture the email of the person downloading the product so you can build an email list. This would be great for me at least. Maybe it has been done as some custom code somewhere?
Thanks
TedT
In file wp-content/plugins/wp-download-codes/includes/download.php
you need ob_flush(); in Line 119 for files larger than 50MB.
while ( !feof( $handle )) {
$buffer = fread( $handle, $chunksize );
echo $buffer;
// gfxh
ob_flush();
// EO: gfxh
flush();
}
]]>
Plugin has stopped working please update and fix errors.
]]>I am using external file hosting on Mediafire and was able to create two releases that download from there but for some reason when I try to create new releases even if I choose the Redirect to different location from the Dropbox it says “No files have been uploaded to the releases folder: /home/promodow/public_html/wp-content/uploads/2020/
You must do this first before adding a release!”
There doesn’t seem to be a way to tell it I want it to download from the external source.
]]>Error on Code generation.
In file “wp-content/plugins/wp-download-codes/includes/helpers/db.php” line 302 I get PHP errors because variable $code_db response NULL instead 0.
Fix for this, change line 302
from
$code_unique = ( sizeof( $code_db ) == 0);
to
$code_unique = ( @sizeof( $code_db ) === 0 || $code_db === NULL);
Is your plugin compatible with WordPress 5.4.2 ?
Can anyone confirm this compatibility?
I am setting WP Download Codes and testing it and started getting the too many unsuccessful download attempts, please try again later message. I waited a day and am still getting that message so I now can’t test codes on my computer. It doesn’t say how long to wait and there doesn’t seem to be any way to circumvent it in Settings. Is there any way to remove that specific function, just too many unsuccessful download attempts not code invalid or download limit reached.
]]>I was wondering if it is possible to have multiple ID’s per shortcode so I only have to have one box for people to enter their unique code, but the code downloads the release associated with it.
Thanks
]]>The submit button underneath the space for the code, appears as a blank square with no text, and it isn’t visible if the background is white, how do I make the “submit” word there, or be visible when the background is white.
( I am a real, true, super beginner at this… sorry)
]]>Hi
I′m trying to external to use an ftp account for storing download assets. I can create a release with hosting type and add the FTP address in the URL. The URL includes user and psw. It all works fine but when downloading the download code is not registered as used and the download is not included in the report. This means that each code can be used as many times the user wants.
The extrnal URL looks lie this: ftp1.dicentia.se/?u=xxxx&p=xxxx&path=/xxxx
If I change the Hosting type to Direct hosting it all works fine. I need to use an external URL to not get limited in bandwidth. The size of the download is 4 GB.
Please advice
/Axel
I have managed to install the plugin and setup one download with 100 codes. I see no help on how to use the code to allow someone to download the file.
Once I have gotten the download code form a webpage, what do I do?
Thanks
TedT
I am going to be selling an item in gift stores, and the item is tied to one of my songs. I would like to give a free download of the song with each item purchased, so there must be a card/label etc with a unique download code in the item. The buyer will go to my site and enter the code (and their email for future contact) and then they will get 1 download that will expire after that. I guess they could leave their email and the code and we could email back a download link but that would require someone at my end to do something work – I’d like to keep it automatic.
Is this something your plugin can do?
Thanks
TedT
Hello, I want to add an anchor to the area where I put the code for when the page refreshes, it is located in the download link and not at the top of the page.
I appreciate your help and time!
Hi everyone,
And thanks again to the dev for this GREAT plugin.
I had issues with WP Super Cache (1.6.9 ) on WP (5.2.2) and WP Download Codes
(2.5.3.1) (with NO x-sendfile)
-> All the download links gave me a “server not found”.
So I had to modify the plugin’s file /includes/shortcode.php and add an extra parameter to the generated download links.
1- In your WP Super Cache plugin settings, in the Advanced tab, localize the “DO NOT CACHE PAGE secret key:XXX1234XXXXX“.
Copy the link (only the part without your domain, like this:
?donotcachepage=XXX1234XXXXX
2- Open the plugin file /includes/shortcode.php in your editor.
On the line 94 you would see:
$html .= ‘<p>
3- So now, on this line 94, replace the ‘/?lease=’ by ‘/&lease=’ and paste the ?donotcachepage=XXX1234XXXXX between / and &lease=
To have something like:
$html .= ‘<p>
4- Save the file
5- Reload your website page where you have your Download Code in it.
Put again your download code. And try again to download.
It should now work
Basically we just said to WP Super Cache to ignore the links generated by WP Download Code.
-> Dear dev, please tell me if it’s OK for you!
Thank you!
]]>Hi – I pasted a second form on one page, but suddenly both forms don’t work anymore.
It just reloads after putting in a code. Now, when I remove the second form, the first one also doesn’t work anymore.
Any suggestions?
]]>Hi there,
the plugin gives lots of php errors when activatin on wordpress 5.2.1, to even the point where the website doesn’t even load anymore.
screenshots:
]]>
Hello,
i have this message No files have been uploaded to the releases folder: /home/ubuntu/workspace/wp-content/uploads/2019/
enven i uploaded file on 2019 folder,
And when i tried the direct url i have the message There was an error adding the release
]]>