latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Protect html file with embeded swf

Home Forums Community Forum Protect html file with embeded swf

Tagged: , ,

This topic contains 15 replies, has 5 voices. Last updated by  Eduan 4 years, 2 months ago.

Topic Author Topic
Posted: Tuesday May 29th, 2012 at 10:52 pm #14892
Dem Strat
Username: panther

Hello,

I have uploaded my html (htm actually) file along with the swf and any other relevant files inside a folder on the “s2member-files” directory.

I have added htm,html,swf,flv in the Inline File Extensions

and I have set unter ” Bsic Download Restrictions” File Downloads ( Level #1 Or Higher ): 99 every 1 days in order to test it.

Now, I want a wordpress page to link (I would like if possible the page to load immediately the htm file) to the html file. Not sure if this is possibe…

When I try to access the htm file directly using its location path:

http://mysite.com/forum/wp-content/plugins/s2member-files/my_folder/something.htm

I get: “Error 500: Internal Server Error”

The directory “forum” is where wordpress is installed.

When I try to access it like this:

http://mysite.com/forum/?s2member_file_download=/my_folder/something.htm

I get my htm page which has a grey background but there is nothing in it. It should load the swf file which is an online course.

What am I doing wrong?

Should it be inline instead of download in the url, what should the format be?

I tried everything. I also read Jason’s post about Advanced Mod rewrite and try to use the links in that section to link to my restricted files but I had no success.

Different approach (that was my first approach really…
I have added a folder in my wordpress root dir with the contents of the htm, swf etc.files. There is a wordpress page that loads the online course perfectly. Is there a way to restrict the page or ideally the folder using URI restrictions? I added in URI restrictions “forum/my_folder/” but it simply doesn’t work.

Thank you,

Dem

  • This topic was modified 4 years, 7 months ago by  Dem Strat.
  • This topic was modified 4 years, 7 months ago by  Dem Strat.

List Of Topic Replies

Viewing 15 replies - 1 through 15 (of 15 total)
Author Replies
Author Replies
Posted: Thursday May 31st, 2012 at 11:42 am #15060
Dem Strat
Username: panther

ok an update… I managed to make it work loading the swf on the page by using the following url:

http://mysite.com/forum/?s2member_file_download=/my_folder/something.swf

Dem

  • This reply was modified 4 years, 7 months ago by  Dem Strat.
Posted: Friday Jul 20th, 2012 at 2:53 pm #19849

Dem, did you figure out why the html version did not work? I have a similar issue but I have to have the swf embedded in html to pass some parameters.
Help

Posted: Monday Jul 23rd, 2012 at 10:18 am #19987
Dem Strat
Username: panther

Hi Nenad,

S2 member’s limitation to load the swf file through your html file is causing this.

Place your html file in the restricted s2member-files folder.

If you move the swf (and javascript if you use one) file in your wordpress directory the file loads just fine.

Your swf file will no longer be protected (which renders the plugin pretty useless) but your customers will not see the absolute path (unless you define it in your html) but of course someone could guess that your swf is located in your wordpress directory.

Support in this forum by the creators is rare or inexistent (I had none) so you will have to count on us, members.

Good luck with your project.

Let me know if you have any other issues.

Dem

  • This reply was modified 4 years, 5 months ago by  Dem Strat.
Posted: Tuesday Jul 24th, 2012 at 9:16 am #20073
Eduan
Username: Eduan
Moderator

Thanks for the tip Dem. :)

Support in this forum by the creators is rare or inexistent (I had none) so you will have to count on us, members.

Just wanted to add, support in the community forums is not gonna come from the support reps, it’s part of their policy, if you want priority support you will need to buy the pro version. So yeah, if you’re not a paid member of s2Member you will need to depend on us users.

Just something to clear up. ;)

Posted: Thursday Aug 30th, 2012 at 2:10 am #23531
Quebro Quebro
Username: quebra

Hi Dem Strat,
I really appreciate your explanation..but it still doesn’t work for me :(
In my case, the swf is embedded in the html page as well.

When you say “If you move the swf (and javascript if you use one) file in your wordpress directory the file loads just fine.”, what do you mean for “wordpress directory”?

I have a folder, inside this folder there is an index.html file and another folder called “files”.
Inside the folder “files” there are subfolders within .swf, .js, .jpg file, etc..

Basically it is a on line magazine that I want to show only to my subscribers.

Is there someone that can really help me?
Please, I will be eternally grateful.

Quebro

Posted: Friday Aug 31st, 2012 at 5:53 am #23664
Dem Strat
Username: panther

The main directory where you installed wordpress. It’s where folders like wp-admin, wp-content etc. appear.

Posted: Friday Aug 31st, 2012 at 11:02 am #23706
Eduan
Username: Eduan
Moderator

Like Dem said, the WordPress directory is where all of your WordPress files are located, also, since we’re talking about s2Member protecting files, you might be interested in knowing, that s2Member only protects files that are under the following directory: wp-content/plugins/s2member-files

You might be interested in this video for more info on file downloads: Video » s2Member® File Downloads (Complete Series)

Hope this helps. :)

Posted: Saturday Sep 1st, 2012 at 2:48 am #23760
Quebro Quebro
Username: quebra

Thank you so much for all the replies.
I watched the whole video but unfortunately I didn’t find a solution.
I am frustrated because it has been a while that I’ve tried to solve this problem. I would like to stick with the s2member plugin and would like to support it and become a paid member, but because this issue is not working out…I have started thinking about changing plugins :( Even if I really really like s2member.
So, I hope that you can help me out.
This is my issue:
I’m publishing a magazine online that only certain subscribers can see, and it has to be protected.
What I have it is a folder called “magazine” with the following inside:
index.html (the page that I would like to run)
book.swf
a subfolder “files”
a subfolder “mobile”

I put that main folder “magazine” inside the directory: wp-content/plugins/s2member-files

Then I created a post on my wordpress home page, wrote “here the magazine!” and inserted an image and linked those words with:
http://www.mywebsite.com/?s2member_file_download=/magazine/index.html

On “Basic Download Restriction”, under “File Downloads ( Level #0 Or Higher )” I wrote “999999999 every 30 days”

I also went to the s2member “Download Options”, under “Inline File Extensions” and wrote the following:
htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv,ogg,webm,swf

Unfortunately all I can get when I click “here the magazine!” is a white page full of weird characters like this:

‹í}kwÛ¶¶àçúWÀ¤8÷ö~˜µÆml 6€ýx°yúöäò?ߝ‰I1Å»/^Ÿ§ïy¿?=ñ¼ÓËSñǯ—¯_‰]wG\f~’GE”&~ìygoœ ?Τ(fÏ[.—îò©›fcïò½÷áí”õ±_X­Ý°£ƒÍ~_äþB†b”¥S1ÏâÃÎÎÎî³®?LçÅ J ™%²ý>T¦~žÆI~ØÒçîÏ?ÿÌ]iÀ4º‹©Ÿ”” §3™å—þ].~‹äR\¤ó,.פ_—“ªÌfqø8T±ôs1œGq!æy”ŒÅq˜¥xËÏ=á’`&”’00*—ivKFiF Cl•EÁDœëÙXðsQLüBŒ%Ž1Ž2\,”Š%yûùD¼‹ý;™ Y¤P1¿-ÒYNõx<ÇçïíY¼’~–ˆišIAˆ¤ñ èG¡m_i\Ûó~¥Ÿ©,|ªØ—Σšs’ÂÀ“¢y7“ŽøÛá†SÈÏ…‡ßÁÄÏrY΋Qÿ'GxL9tþCÞZ¼lì4êœÊ<È¢âd]µ_d"3¿H3{ W/ãh&ޝ¾€¿Wí©»sS™o4£µ™¤SÁQˣ߸‰ü¸wàq SÏyÄóPŠ“‹ D:,Î4Jü0šÜÁŒü9Ð×8Jro懴Î~

….and so on so forth…..

Is there a way to see the index.html content inside the “s2member-files” folder? I tried many things but it seems like it’s not working.

Please, tell me that there is a solution.
Enlighten me! :)

Thanks!

Posted: Tuesday Sep 4th, 2012 at 7:53 am #24020
Eduan
Username: Eduan
Moderator

Hello Quebro,

I received your email, well, can I suggest you followed the instructions under Dashboard -› s2Member® -› API / Scripting -› Custom Capability and Member Level Files? If not, please do and tell me how it goes. :)

Hope this helps. :)

Posted: Tuesday Oct 16th, 2012 at 1:29 am #28496
Quebro
Username: quebro

Thank you for your answer Eduan,
I tried that way…but nothing..On firefox it gives me the error:
“Warning: Cannot modify header information …./htdocs/wp-content/plugins/s2member/includes/classes/files-in.inc.php(387) : eval()’d code:1) in …/htdocs/wp-includes/pluggable.php on line 881”

While on chrome it shows the error 404.

I even tried the “Advanced Mod-Rewrite Linkage”…but nothing…

any other idea?
please…

quebro

Posted: Tuesday Oct 16th, 2012 at 9:35 am #28532
Eduan
Username: Eduan
Moderator

Hmm… I’m afraid I don’t know what else to offer, I don’t have a lot of experience with embedded files.

BTW, that error says that something within WordPress is wrong. Have you tried doing a compatibility test with your plugins and your theme? Simply disable all your plugins except s2Member and see if the problem remains, and for your theme, simply change back to the default WordPress theme (TwentyEleven).

– Eduan

Posted: Friday Oct 19th, 2012 at 5:43 am #28972
Quebro
Username: quebro

Thanks again for your suggestion. I tried to disable all the plugins…but nothing happened….but I have some news..

Because it was giving me this problem (with Firefox):
“Warning: Cannot modify header information …./htdocs/wp-content/plugins/s2member/includes/classes/files-in.inc.php (387)….”

and with Chrome and Internet Explorer it displayed a long page with all these weird characters:
‹í}kwÛ¶¶àçúWÀ¤8÷ö~˜µÆml 6€ýx°yúöäò?ߝ‰I1Å»/^Ÿ§ïy¿?=ñ¼ÓËSñǯ—¯_‰]wG\f~’GE”&~ìygoœ ?Τ(fÏ[.—îò©›fcïò½÷áí”õ±_X­Ý°£ƒÍ~_äþB†b”¥S1ÏâÃÎÎÎî³®?LçÅ J ™%²ý>T¦~žÆI~ØÒçîÏ?ÿÌ]iÀ4º‹©Ÿ”” § …etc etc…

I searched on the website and I found this page:
http://www.s2member.com/forums/topic/protected-pdfs-downloading-corrupt/
and, as Jason says, I edit the file …/s2member/classes/files-in.inc.php and changed the:
header(“Content-Encoding:”) in header(“Content-Encoding: none”);

and now what I see it is just a white page! It does not give any error but still I don’t see the inline file. Am I closer to a solution????
Is there something I can change in the files-in.inc.php or in the index.html?

2. If I try the Advanced Mod-Rewrite Linkage (…/wp-content/plugins/s2member-files/index.html)

the message I get is the Error 500 – Internal Server Error, saying that the error can be caused by a CGI script that is not working or the .htaccess file containing errors.
So I wrote the provider (tophost.it) and they just said to delete the .htaccess file from the s2member plugin. But if I do that all my files won’t be protected!

Is there something I can do?

Please, I need help! :s Thank you.

Posted: Friday Oct 19th, 2012 at 11:02 am #29032
Eduan
Username: Eduan
Moderator

Hmm… I would suggest that you try reinstalling s2Member, deleting it and installing it again, be sure to have Deactivation safeguards enabled, however. (Dashboard -› s2Member® -› General Options -› Deactivation Safeguards)

Make sure to delete anything that s2Member creates, which are the following folders:
s2member
s2member-files

Backup any files that you have already uploaded to the s2member-files folder, just so that you can re-upload them later. You can of course skip this if you still have a copy or if there aren’t any important files in there. :)

The s2member-logs folder doesn’t matter, you can leave that one there.

If that doesn’t help, then follow the instructions in this artcile:
Knowledge Base » Resolving Problems with File Downloads

Hope this helps. :)

Posted: Thursday Oct 25th, 2012 at 5:59 pm #29709
Quebro
Username: quebro

I did everything you said, Eduan…but nothing happened… :(
I hope to find a solution soon
Thanks again for you help!

Posted: Thursday Oct 25th, 2012 at 8:28 pm #29721
Eduan
Username: Eduan
Moderator

Hmm… I’m out of ideas. :/

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.