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.

s2hacks.php error

Home Forums Community Forum s2hacks.php error

This topic contains 13 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 9 months ago.

Topic Author Topic
Posted: Saturday Mar 23rd, 2013 at 6:03 am #45537
Damian Jones
Username: aegis

I want to auto-login people after registration. I added this code to the hacks:

and I get this error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/detoxing/public_html/wp-content/mu-plugins/s2hacks.php:13) in /home/detoxing/public_html/wp-content/plugins/a10-imaio/aioviraltoolkit1.php on line 2

(a10-imaio/aioviraltoolkit1.php) is my plugin I use for the Videos… it is: InstaMagic’s FanBuzz / Simple Video Pro

Can you tell me how to fix this?
Thank you.
Richard

List Of Topic Replies

Viewing 13 replies - 1 through 13 (of 13 total)
Author Replies
Author Replies
Posted: Saturday Mar 23rd, 2013 at 7:11 am #45538
Damian Jones
Username: aegis

Wow, Okay… I added the actual code to another file and then just did this:

if($_GET['s2member_paypal_proxy'] == "clickbank" && $_GET['s2member_paypal_return'] == "1") {
        include("/home/detoxing/wpinc/auto_login_code.php");
}

Same error.

Then I hide the include:

if($_GET['s2member_paypal_proxy'] == "clickbank" && $_GET['s2member_paypal_return'] == "1") {
        //include("/home/detoxing/wpinc/auto_login_code.php");
}

Same error!!

It appears that just having a php file in the mu-plugins creates the error…

very strange.

any ideas?
Thanks,
Richard

Posted: Saturday Mar 23rd, 2013 at 9:13 am #45549

headers already sent (output started at /home/detoxing/public_html/wp-content/mu-plugins/s2hacks.php:13)

You seem to have a space or line brake outside the PHP block, make sure the file starts and ends with the PHP tags, and nothing is outside.

By the way, that auto-login hack is old, try the one given here, please: Knowledge Base » Auto-Login Upon Registration

Posted: Saturday Mar 23rd, 2013 at 6:40 pm #45574
Damian Jones
Username: aegis

Thank you!! that seemed to make the session error go away. However with the new code in there, it broke my website.

Now nothing on my website loads, and the error_log is blank, it is not showing any errors.

any idea why it does not work?

I added the code as it is…

Was I suppose to change it to something else?
Thanks,
Richard

Posted: Saturday Mar 23rd, 2013 at 7:03 pm #45575
Damian Jones
Username: aegis

Ok, sorry, I found the problem. I had added that code in the functions file, because of the session error. Now I removed it and the blank pages went away.

Then I did a test purchase and it sent me to create an account.
Once I did, it auto logged me in and sent me to the OTO

Then I purchased that and it took me to the s2member payment success which says this:

Thank you! (you MUST check your email before proceeding).

* Note: It can take (up to 15 minutes) for Email Confirmation with important details. If you don’t receive email confirmation in the next 15 minutes, please contact Support.

why did it do that?

why does it not tell me that it was approved and added the access to my account, then let me auto-log back in?

The button says: “Back to Home Page”, which takes me to the home page, which is the sales letter.

any idea?

Thank you.
Richard

Posted: Saturday Mar 23rd, 2013 at 7:11 pm #45576
Damian Jones
Username: aegis

I reloaded the page 3 times, all did the same thing, check my email.

I then clicked the complete your purchase again on clickbank receipt, while holding down the ctrl key, so it opened in a new tab, this time it worked. But it did not auto-log me in… it finally said it was approved and added to my account, the button said to login again…

Why did it not auto-log me back in?

Thanks,
Richard

Posted: Tuesday Mar 26th, 2013 at 7:35 am #45722

Well, the auto-login hack hooks to the registration, not upgrades. I’m going to ask Jason about this.

You are using the hack in the article I linked to, right? Knowledge Base » Auto-Login Upon Registration

Posted: Friday Mar 29th, 2013 at 12:27 am #46025

Here’s what Jason said:

Well the customer is not logged out during an upgrade. We simply ask them to log back in because this clarifies things a little from the customer perspective (i.e. please log back in because now your account is a bit different); and they land back on the Login Welcome Page, so this feels logical to a customer.

However, you can modify this behavior by simply adding a hack like this, which detects if the customer is already logged in when they reach the login screen.

[hilite pre_code]

For the redirection you can try [hilite mono]wp_redirect[/hilite] or [hilite mono]header[/hilite].
http://codex.wordpress.org/Function_Reference/wp_redirect
http://php.net/header

And this hack could go in the same must-use plugin file as the auto-login one, in which case you’d already have the PHP block open and don’t need a new [hilite code]

Posted: Friday Mar 29th, 2013 at 11:09 pm #46119
Damian Jones
Username: aegis

Thank you. I did another test purchase to test this out, why does the first thank you page of the main order take me to this message:

[ MY WEBSITE ] says… 
Thank you! (you MUST check your email before proceeding).

* Note: It can take (up to 15 minutes) for Email Confirmation with important details. If you don't receive email confirmation in the next 15 minutes, please contact Support.

Why does it not say the account was approved, click here to create your account? so they don’t have to wait for the email??

Thank you.
Richard

Posted: Saturday Mar 30th, 2013 at 10:31 pm #46182

Sometimes s2Member doesn’t get confirmation from the gateway right away, so it instead of making the user wait for a long while before showing him a page, he’s told to check the email later, which will be sent when s2Member finally confirms it.

Posted: Monday Apr 1st, 2013 at 12:20 am #46245
Damian Jones
Username: aegis

Ok, no problem, but, why if I refresh the page, is it the same, but if I click the button again (because I always open it in a new tab, so I can click it again, if there is a error when I do click it without going back), does it work right away, even if that was 1 second after it said the check email message?

Can I change that message, somewhere?

Posted: Monday Apr 1st, 2013 at 12:34 am #46250

You can use the success attribute to show them your own custom thank-you page.
[hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Custom Return URLs Upon Success[/hilite]
[hilite path]Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes -> success[/hilite]

Posted: Monday Apr 1st, 2013 at 5:51 am #46265
Damian Jones
Username: aegis

What about for Clickbank returns?

Thanks,
Richard

Posted: Monday Apr 1st, 2013 at 6:57 am #46267

Ah, sorry, silly me, I forgot you are using ClickBank. Here: [hilite path]Dashboard -› s2Member® -› ClickBank® Options -› Thank-You Page Integration -> Customizations[/hilite]

And you’ll find this useful to encode the thank-you page’s URL for the [hilite mono]s2member_pro_clickbank_return_success[/hilite] variable: http://meyerweb.com/eric/tools/dencoder/

Viewing 13 replies - 1 through 13 (of 13 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.