wpsharks / s2member

s2Member® Framework (membership management for WordPress®).
64 stars 36 forks source link

s2member rewriting the content of dowloaded files from the s2members-files folder #1182

Closed xavierbergantz closed 4 years ago

xavierbergantz commented 4 years ago

EXPLANATION OF THE ISSUE

All ZIPs downloaded from the s2members-files folder are corrupted. No changes have been made at WP level. It doesn't work even if the other plugins are disabled and the theme has never changed (none update for months). It's been working for years, but not for about 15 days (maybe since the last update of s2member-pro but I can't certify it).

I tried all the possibilities described in "Download Options" (like "/wp-content/plugins/s2member-files" as a direct link, or "/?s2member_file_download=" or with the shortcode, the result is the same).

So I tried another type of file: a "TXT" file. The .TXT file is downloaded, but the text it contains is systematically modified. In the file named "test.txt", there is only one line of text: "This is a test". Once downloaded, this line becomes: "ƒ€This is a test". Conclusion, s2member rewrites the content of the file, which is why ZIP files are considered corrupted.

I would like to make it clear once again that there has NEVER been a problem so far. It started about two weeks ago for no apparent reason.

I use s2member PRO in a professional context and this download function is ESSENTIAL. Do you have any idea what might be causing this problem?

Thank you in advance for your kind attention.

krumch commented 4 years ago

Are ZIP files OK if you download them by FTP and open them?

Maybe you use some plugin or PHP extension or browser plugin to set mode to download files?

xavierbergantz commented 4 years ago
Hi, Thanks for your quick reply.No I have no problem uploading the files via FTP, nor via the browser if they are in a folder other than s2member-files. In this folder, ZIP archives can be unzipped without any problem as long as they are on the server. It is when they are on the PC that the files are rewritten (maybe by the PC itself but I have no problem if the files are downloaded from another folder than s2member-files). I have installed the free version of s2Member on a brand new, up-to-date wordpress, under a different domain name, without any other plugins. It doesn't work either (so it wouldn't come from the "Pro" version). Xavier  De : krumchEnvoyé le :lundi 9 mars 2020 07:43À : wpsharks/s2memberCc : xavierbergantz; AuthorObjet :Re: [wpsharks/s2member] s2member rewriting the content of dowloaded files from the s2members-files folder (#1182) Are ZIP files OK if you download them by FTP and open them?Maybe you use some plugin or PHP extension or browser plugin to set mode to download files?—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.  Garanti sans virus. www.avast.com
krumch commented 4 years ago

Sorry that I didn't explain well... So, questionlist:

You DOWNLOAD a file as usual customer (not admin) who have access to do that. Is it corrupted?

You DOWNLOAD same file by FTP, from server to your PC. Is it corrupted?

You create a new ZIP file and UPLOAD it to s2M's folder. Then try above 2 tests again, with this new file, so you have to answer to both questions above.

Please show me these 4 answers, to think about.

For better results, do same with another computer, and give me another 4 answers too.

xavierbergantz commented 4 years ago
You DOWNLOAD a file as usual customer (not admin) who have access to do that. Is it corrupted?YES it is corrupted (both as an admin and as an authorized user.).You DOWNLOAD same file by FTP, from server to your PC. Is it corrupted?The same file is not corrupted while downloaded by FTP.You create a new ZIP file and UPLOAD it to s2M's folder. Then try above 2 tests again, with this new file, so you have to answer to both questions above.I have already done this test (with a ZIP uploaded on the server and with a text file). I just did it again, the result is the same.Please show me these 4 answers, to think about.For better results, do same with another computer, and give me another 4 answers too. I ran all the tests again with a smartphone. The results are exactly the same ! ☹ Ununderstandable ! Why now ? Why not before… ?!   De : krumchEnvoyé le :lundi 9 mars 2020 11:56À : wpsharks/s2memberCc : xavierbergantz; AuthorObjet :Re: [wpsharks/s2member] s2member rewriting the content of dowloaded files from the s2members-files folder (#1182) Sorry that I didn't explain well... So, questionlist:You DOWNLOAD a file as usual customer (not admin) who have access to do that. Is it corrupted?You DOWNLOAD same file by FTP, from server to your PC. Is it corrupted?You create a new ZIP file and UPLOAD it to s2M's folder. Then try above 2 tests again, with this new file, so you have to answer to both questions above.Please show me these 4 answers, to think about.For better results, do same with another computer, and give me another 4 answers too.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.  Garanti sans virus. www.avast.com
krumch commented 4 years ago

How about PC?

Please note, that your answer is clogged, maybe you answer by smartphone? If so maybe this is a "dumb phone", that generates all kinds of errors? :-)

xavierbergantz commented 4 years ago
 The PC is the same for months : Processor Intel Core 2.90GHz Windows 10.I don’t use a smartphone to answer but the Microsoft soft connected to my Gmail account : « Courrier pour Windows 10 »  De : krumchEnvoyé le :lundi 9 mars 2020 16:21À : wpsharks/s2memberCc : xavierbergantz; AuthorObjet :Re: [wpsharks/s2member] s2member rewriting the content of dowloaded files from the s2members-files folder (#1182) How about PC?Please note, that your answer is clogged, maybe you answer by smartphone? If so maybe this is a "dumb phone", that generates all kinds of errors? :-)—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.  Garanti sans virus. www.avast.com
krumch commented 4 years ago

Did you get dame results on PC? And on another PC?

Can you answer in Github, instead by email?

xavierbergantz commented 4 years ago

😲 WOW, I understand why you prefer I answer on Github... Really sorry! Unfortunately, I don't have a whole range of PCs at my disposal. I'd love to, but that's it! But I can tell you that I was informed of these errors because my customers came to complain that no more ZIP files could be downloaded. They were the first to encounter this problem. Not just one or two, but ALL of them. So I don't believe that my own PC is involved.

krumch commented 4 years ago

OK, so you didn't run the tests by FTP? Or you have FTP client in your phone?

xavierbergantz commented 4 years ago

No, I don't use my smartphone. I'm just curious to see if the error was also caused on a completely different system (Android, based on Linux).

For clarity, I'm making a copy-paste of my previous answers:

You DOWNLOAD a file as usual customer (not admin) who have access to do that. Is it corrupted?

YES it is corrupted (both as an admin and as an authorized user.).

You DOWNLOAD same file by FTP, from server to your PC. Is it corrupted?

The same file is not corrupted while downloaded by FTP.

You create a new ZIP file and UPLOAD it to s2M's folder. Then try above 2 tests again, with this new file, so you have to answer to both questions above.

I have already done this test (with a ZIP uploaded on the server and with a text file). I just did it again, the result is the same.

Please show me these 4 answers, to think about. For better results, do same with another computer, and give me another 4 answers too.

I ran all the tests again with a smartphone. The results are exactly the same ! ☹ Ununderstandable ! Why now ? Why not before… ?!

The PC I use is the same for months : Processor Intel Core 2.90GHz Windows 10.

krumch commented 4 years ago

Sorry, seems I miss some parts of your answer before, thanks for clarify. OK, another test: deactivate s2M and download the same file by it's path on the site, check if it is corrupted.

xavierbergantz commented 4 years ago

From s2M-files : error 404. From another folder ouside s2M : OK, no problem.

krumch commented 4 years ago

Please show me URLs, and explain in which directory you put ZIP files.

xavierbergantz commented 4 years ago

The domain is academie.ws

The URL where ZIPs are is academie.ws/campus/wp-content/plugins/s2member-files/ ZIP files are located in the folder itself and in subfolders. For example: s2member-files/file.zip and s2member-files/folder1/file.zip

Again, I specify that NOTHING has changed for months until it doesn't work anymore, neither under this domain name and this site, nor on another one where a WP has been installed with s2member Framework to test the download function on another installation with another architecture.

No one else has encountered this problem yet? Are there any known causes of incompatibility with certain servers or some of their functions? But as far as I know nothing has changed on that front either.

If the download system doesn't work with s2M anymore, too bad, I'll find another one, but we'd have to find out why it doesn't work anymore!

xavierbergantz commented 4 years ago

Nothing more?! I'm very sorry but as strange as this situation is, I'm waiting for a solution. That's the price you pay when you sell something to someone... against payment. I'm sorry. I'm waiting for your news.

krumch commented 4 years ago

I am independent developer (still I do some jobs for s2M), with my products, just try to help you. I could not able to repeat the problem, download links works well for me. Maybe you will allow me to do tests on your site, to see what is wrong? Find me at https://krumch.com/contacts

xavierbergantz commented 4 years ago

WOW... Congrats to S2M! And... sorry for my part. Thanks for helping. I'll to re-install everything. Maybe a corrupted file somewhere. Many thanks for your time.

Have a nice day and good luck. Best regards.

Xavier