Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Why does PayPal IPN Module malfunction on PHP 5.3 server?


Code_Smith

Recommended Posts

I just moved my osCommerce 2.2-MS2 shop to Westhost’s new cPanel server with PHP 5.3 and register_globals = Off, With the help of php.ini files setting register_globals = On the shop seems to be working OK except for the PayPal IPN Payment Module v2.3.4.6.

 

Actually the PayPal IPN Payment Module sort of works as long at the customer doesn’t edit the order after reaching checkout_confirmation.php. On the previous server I was using, WH3 PHP 4x, the IPN Module would set up a complete new order each time the customer returned to checkout_confirmation.php, leaving me to delete some incomplete orders which wasn't difficult. But on this new server the ipn.php gets mixed up when the customer returns to checkout_confirmation.php a second time and deletes the record in the orders table it setup on the previous visit to checkout_confirmation.php. On the previous server no order records were deleted by the ipn.php file, just new records added. It sets up a new record in the orders table with a new orders_id like it did with the previous server but it doesn’t create corresponding new records in the orders_products and orders_status_history tables. The results is that the customer can complete payment for the order and I get paid by Paypal, but the customer can’t access the order in his online account and no email is sent to him and I can’t view the order as administrator.

 

I there anybody that knows why PayPal IPN Payment Module is malfunctioning as described above?

Link to comment
Share on other sites

  • 3 months later...

@@seanpatrick

 

osCommerce v2.2 RC carts were originally coded for use with PHP 5.2.x and were backward compatible with PHP 4.x. So, now that servers are upgrading to PHP 5.3.x, those older carts will no longer function without being upgraded.

 

If you are using a cart older than the RC versions, such as MS2 I wouldn't even bother trying to update it, it's time to replace it with the latest stable release (currently v2.3.3)

 

 

 

Chris

Link to comment
Share on other sites

@@DunWeb I have a number of MS2 installations working perfectly fine on PHP 5.3.x servers, with the only exception being this IPN issue. It's not really an option at this point to start from scratch or lose functionality not available in RC, so solving this one issue seems like the best option. Thanks.

Link to comment
Share on other sites

@@seanpatrick

 

I have a number of MS2 installations working perfectly fine on PHP 5.3.x servers, with the only exception being this IPN issue.

 

If that's the case, then your MS2 sites have already been updated. The original code was not written for use with PHP5.3. If the PayPal IPN module you are using is not functional with PHP 5.3.x, I suggest updating to a newer version that is.

 

 

 

Chris

Link to comment
Share on other sites

@@seanpatrick

 

Well, that is the fault of proper enforcement by this forums moderators. This is an English forum so there shouldn't be any other languages permitted, that goes for the contribution area as well, however this forum allows for the 'bending' of the rules by members and the forum moderators as well.

 

 

I don't have any suggestions for you, other than to perhaps use a language translator to change it to English so you can use it.

 

 

 

Chris

Link to comment
Share on other sites

  • 2 months later...

Go to your admin server_info.php and check if magic_quotes_gpc is turned ON.

If it is, you should turn it off via your main php.ini, or ask your host to turn it off for you or move you to a server that has this option turned off.

More details: http://php.net/manual/en/security.magicquotes.disabling.php

This supposed to fix your Paypal IPN problem and many other contributions.

 

I also recommend, assuming you are on RC2a, that you also modify your code according to http://www.oscommerce.info/confluence/display/OSCOM23/v2.2+to+v2.3.0

And of course go through all other files and contributions and revise the deprecated ereg, eregi, split and other functions to the preg_match, preg_split, explode and other substitute PHP 5.3 functions, with their correct syntax.

Doing all the above fixed all my 2.2 RC2a issues with PHP 5.3 and it's now working perfectly.

Edited by dr_lucas
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...