Latest News: (loading..)
sara75

PayPal try to access pro_hosted_ipn.php and get Error 500

7 posts in this topic

Hi all, 

Yesterday I changed my server and everything works fine, customers are buying and also payment with paypal works fine, but on my error log I find:

[Fri Jan 27 14:14:12.636776 2017] [fcgid:warn] [pid 9557:tid 140124086036224] [client 173.0.81.1:36292] mod_fcgid: stderr: PHP Fatal error:  Call to a member function getApiResult() on null in /...../ext/modules/payment/paypal/pro_hosted_ipn.php on line 28

and in access_log 

173.0.81.1 - - [27/Jan/2017:14:14:12 +0100] "POST /ext/modules/payment/paypal/pro_hosted_ipn.php HTTP/1.0" 500 423 "-" "PayPal IPN ( https://www.paypal.com/ipn )"

Someone can help me finding what's wrong?

Share this post


Link to post
Share on other sites

Did "changing your server" involve moving your code to a higher PHP version? What osC version are you using? Possibly the add-on you're using for this PayPal service needs to be updated for your PHP version.

Share this post


Link to post
Share on other sites

Yes, I presume it's a php version problem. 

The error is PHP Fatal error: Call to a member function getApiResult() on null in /...../ext/modules/payment/paypal/pro_hosted_ipn.php on line 28

Line 28 is    

 $result = $paypal_pro_hs->_app->getApiResult('APP', 'GetTransactionDetails', array('TRANSACTIONID' => $HTTP_POST_VARS['txn_id']), (OSCOM_APP_PAYPAL_HS_STATUS == '1') ? 'live' : 'sandbox', true);

Old server Php 5.2.11  - MySQL 5.0.88 

New server is Php 5.6.29 - MariaDB 10.0.28

 

PayPal is trying to update the orders with new information about refound etc. 

Share this post


Link to post
Share on other sites

What. Is. Your. osC. Version? If you have an old one, it's not worth going through the effort to make it PHP 5.6 or 7 compatible. Only the newest one (2.3.4BS Edge) is worth the effort (it's already 5.6 compatible). There are instructions on this forum.

 

The actual error is going to be upstream from line 28. Somewhere $paypal_pro_hs->_app should get created, but in your case something broke and nothing was created. Going from PHP 5.2 to 5.6 is a Great Leap Forward, and millions will die. It's possible to fix up your existing code, if you're an experienced programmer, but it will usually be quicker just to install 2.3.4BS and migrate your data over. Plus, you'll have the latest and greatest code (although it will need updating for PHP 7 when that happens) and responsive interface.

Share this post


Link to post
Share on other sites

@@MrPhil I already have a 2.3.4BS   :thumbsup: but it's hardly modded  :-

I compared and updated all files of PayPal App without result  <_<

It's quite hard to debug as the show is live and working hard (fortunately  B)) 

Share this post


Link to post
Share on other sites

Is this PayPal an add-on, or built in to 2.3.4BS? If it's an add-on, it's possible that its code needs updating to work with PHP 5.6. Inquire on its support thread. If it's built in to osC 2.3.4BS, it sounds like either a bug that Gary should know about, or a misconfiguration somewhere. I've never used this code, so I can't offer any help in debugging it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now