PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Error on POST

s2Member Plugin. A Membership plugin for WordPress®.

Re: Error on POST

Postby Jason Caldwell » August 5th, 2010, 12:34 pm

Hi Luna. I just logged in and took another look.

I ran another test transaction, and I WAS able to reproduce the error again.

However, my WinSCP/SFTP access is no longer available it seems?

Anyway... here are some things I would have a look at now:
1. Is your PayPal PDT Identity Token entered correctly?

If it is, then please upload these three files anywhere on your site.
~ All three files are inside of this zip distribution.
curl-fopen-tests.zip
(1.43 KiB) Downloaded 49 times
curl-test-http-google.php ( open in a browser, you should see Google's home page ).
curl-test-https-paypal.php ( open in a browser, you should see PayPal.com )
fopen-test-https-paypal.php ( open in a browser, you should see PayPal.com )


If one of the cURL tests fail, but the fopen test succeeds, I recommend this solution.
Code: Select all
Create a new PHP file, and name it:
s2member-hacks.php

Place these lines inside it:

<?php
add_filter("use_curl_transport", "disable_curl");
function disable_curl($use_curl_transport){ return false; }
?>

Save that file in this location:
/plugins/s2member/includes/functions/s2member-hacks.php
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Error on POST

Postby dmasciangelo » August 9th, 2010, 3:49 pm

Jason Caldwell wrote:...
3. I then uploaded /club/phpinfo.php
and I then discovered that you're running on a Windows server, with the cURL extension enabled. That's not a bad thing, but there are known issues with cURL on Windows, particularly with SSL connections, which are required by s2Member, in order to speak with PayPal.

...

Conclusion. There seems to be an issue with the installation of cURL on your server. Fortunately, s2Member does NOT rely solely upon the cURL extension. s2Member can use a variety of methods, through the WP_Http class. The best method can be determined automatically by s2Member.

The problem on your server, is that cURL is installed ( which s2Member considers the best choice ). However, in your case, it's not ( because it's broken somehow ). So the solution that I recommend, is to disable the cURL extension, by editing the php.ini file on your server.

You'll find a line that looks something like this:
Code: Select all
extension=php_curl.dll

Change that to this ( disable it ):
Code: Select all
;extension=php_curl.dll

Then, restart your web server and run another test transaction.

@C/TODO :: In the next release of s2Member... determine if there is a way for s2Member to avoid this problem automatically whenever cURL is not working as expected in a Windows environment.


Thanks for this post, solved my challenge perfectly while I was having problems setting this up on my test machine which was running Windows.
User avatar
dmasciangelo
Experienced User
Experienced User
 
Posts: 5
Joined: August 9, 2010
Location: Peoria, AZ

Re: Error on POST

Postby Jason Caldwell » August 17th, 2010, 3:49 am

@COMPLETED TODO :: In the next release of s2Member... determine if there is a way for s2Member to avoid this problem automatically whenever cURL is not working as expected in a Windows environment.

This problem was addressed with the release of s2Member v3.2.

- Compatibility. On a Windows® server, the cURL extension is usually NOT compatible with SSL communications. s2Member now signals to the WPHttp class, that it should temporarily disable the cURL transport when a remote URL is being processed with an https:// prefix. This allows the WPHttp class to recover gracefully (automatically) and fall back on the FOPEN method. If you're running WordPress® on a Windows® server, you should make sure that you have this inside your php.ini file. ( allow_url_fopen = on ). A symptom of this bug, was to see an error in your paypal-ipn.log file, with something like: Unable to verify _POST vars....
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Previous

Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 13 guests

cron