Paypal call function not compatable with PHP7 - How do i Update?
Hi All,
I had a costumer report a problem paying on our website this http://www.thegreatgiftshop.co.uk.
After testing it was throwing an Internal Server error 500 when the customer clicked "Pay by Paypal".
After some digging it became clear its an issue on the servers so I gave our hosts a call (UK2) for more info.
It turns out just this morning that they had updated their security systems to PHP7.
Basically the PHP function which calls paypal is not PHP7 compatible and thus its throwing the Security Error.....the rest of my site is fine.
Unfortunately I have no idea where to or how to update this particular function to make it php7 compatible.
They have temporarily set my site to the previous version of PHP but this is only temporary so I can at least take orders again now.....but must get this problem resolved as a matter of urgency.
Can anyone tell me exactly what I need to do to fix this?
Many Thanks!
John
Re: Paypal call function not compatable with PHP7 - How do i Update?
ZC 1.5.4 was not designed to work with php 7.x and it wasn't until ZC 1.5.5 that all of the features and code were updated to support PHP 7.x. See the minimum server requirements: http://www.zen-cart.com/content.php?...o-run-zen-cart
So recommendation is to update to at least ZC 1.5.5e where the 1.5.5 series was released almost two years ago now.
Recommended process for upgrading by rebuild: http://www.zen-cart.com/entry.php?3-...d-of-upgrading
Re: Paypal call function not compatable with PHP7 - How do i Update?
Hi MC
Many Thanks for the swift reply. Would I be right in saying an Upgrade would wipe out all customization and site templates etc that im using?
UK2 said from their end it looks like the rest of the site is OK with there PHP7 upgrade apart from the Paypal call function.
Unfortunately at this stage a total reinstall is out the question until after Christmas. UK2 have given until November to get round the problem and as the problem is to do with just the paypal call is there no work around I can use until next year?
Kind Regards,
John
Re: Paypal call function not compatable with PHP7 - How do i Update?
Quote:
Originally Posted by
Bronco78th
Hi MC
Many Thanks for the swift reply. Would I be right in saying an Upgrade would wipe out all customization and site templates etc that im using?
UK2 said from their end it looks like the rest of the site is OK with there PHP7 upgrade apart from the Paypal call function.
Unfortunately at this stage a total reinstall is out the question until after Christmas. UK2 have given until November to get round the problem and as the problem is to do with just the paypal call is there no work around I can use until next year?
Kind Regards,
John
If performed as recommended above, no, those things would remain available and as part of the process would be integrated.
As to the changes and operation. There are two major changes that must be implemented for software running on php 7.0.x. They are that class definitions need to use __construct( instead of the classname( for initiation of the class. That structure has been available since at least early php 5, but hadn't been implemented across the board. The other is that any case of $$ needs to be properly handled. The ipn_main_handler (part of the paypal process) itself has/had at least two occurrences, but there are other places within the ZC software where such needs to be addressed/corrected.
It may be possible (though not advised) to pull just the paypal payment files from ZC 1.5.5 and use them, though as I recall from almost 2 years ago there were changes elsewhere needed to make ZC cooperate with php 7.0.