MattMa Posted May 10, 2010 Share Posted May 10, 2010 Hello, I have a website which processes paypal payments, I use the well know ipn_res.php (and ipn_cls.php) pair of scripts to process the response I get from PayPal. I use hosted Paypal buttons WPS with hosted buttons to pass the buyer to PayPal and I use IPN to track the sale when a successful payment is made. Last week the script suddenly stopped working after my hosting company updated from PHP 5.2.11 to 5.2.13, I have absolutely no idea what part of the script has failed. I looked on the main PHP website to find deprecated methods but couldn't find anything. I think this problem will affect a lot of people when their hosting company upgrades to PHP 5.2.13. If you would like to see the two scripts you can download them from http://www.opendb.net/element/369.php Any ideas anyone? Regards, Matt Does a Quote Link to comment https://forums.phpfreaks.com/topic/201273-ipn_resphp-stopped-working-after-updating-from-php-5211-to-php-5213/ Share on other sites More sharing options...
Mchl Posted May 10, 2010 Share Posted May 10, 2010 You should ask your hosting company if they did any changes in PHP configuration. It is unlikely that such radical changes were introduced in minor version of PHP, so it's most likely a configuration isssue. Quote Link to comment https://forums.phpfreaks.com/topic/201273-ipn_resphp-stopped-working-after-updating-from-php-5211-to-php-5213/#findComment-1055945 Share on other sites More sharing options...
PFMaBiSmAd Posted May 10, 2010 Share Posted May 10, 2010 That code is really way out of date. It uses $HTTP_POST_VARS instead of $_POST. $HTTP_POST_VARS were depreciated in php4.1 (10-Dec-2001) when $_POST was introduced, turned off by default in php5, finally throws a depreciated error when turned on in php5.3, and have been completely removed in php6. Change the following line from - $paypal_info = $HTTP_POST_VARS; to - $paypal_info = $_POST; You should probably also change the short open tag <? to <?php Quote Link to comment https://forums.phpfreaks.com/topic/201273-ipn_resphp-stopped-working-after-updating-from-php-5211-to-php-5213/#findComment-1056050 Share on other sites More sharing options...
MattMa Posted May 10, 2010 Author Share Posted May 10, 2010 Woohoo!! PFMaBiSmAd you rock! I never spotted that. I made the code change and it seems to work! Well done sir! Thank you very much indeed for your help, it is greatly appreciated!! Matt Quote Link to comment https://forums.phpfreaks.com/topic/201273-ipn_resphp-stopped-working-after-updating-from-php-5211-to-php-5213/#findComment-1056075 Share on other sites More sharing options...
Mchl Posted May 10, 2010 Share Posted May 10, 2010 For your information. short_open_tag setting has been changed by your hosting. (Possibly some others too) Quote Link to comment https://forums.phpfreaks.com/topic/201273-ipn_resphp-stopped-working-after-updating-from-php-5211-to-php-5213/#findComment-1056078 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.