townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/28/2019 : 06:36:57
Hi. My host has recently upgraded to PHP 7.2. When I add a product to the cart and click checkout I get the following error message :
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /home/kylqhqxx/public_html/vsadmin/inc/inccart.php:3268 Stack trace: #0 /home/kylqhqxx/public_html/vsadmin/inc/inccart.php(3271): encryptAes('VendorTxCode=19...', 'BTem74Q3Qqnuk5K...') #1 /home/kylqhqxx/public_html/cart.php(186): include('/home/kylqhqxx/...') #2 {main} thrown in /home/kylqhqxx/public_html/vsadmin/inc/inccart.php on line 3268
This is porotracing.com running php v6.7.0 responsive. I have checked the includes.php that is uses <?php ?>
At the moment I have reverted back to php 5.6 via my cpanel multi php manager to make sure things can still work.
Thanks
|
Andy
ECT Moderator
95440 Posts |
Posted - 05/28/2019 : 06:48:42
Hi Can you check the syntax in db_conn_open.php that it's the same as in the example here https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737 Can you also let us know which payment method you are using? Is it Sagepay? Andy Please feel free to review / rate our software
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/28/2019 : 06:59:54
Yes db_conn_open.php is the correct syntax and yes I am using Sagepay
|
Andy
ECT Moderator
95440 Posts |
Posted - 05/28/2019 : 07:06:26
If you're not already I would make sure you are using Sagepay via the payment providers admin page rather than the the Custom option there https://www.ecommercetemplates.com/phphelp/ecommplus/sagepay.asp If that's not the issue, ask your host if they can enable mcrypt as you are wanting to run PHP 7.2 and that is probably the cause of the error. Andy Please feel free to review / rate our software
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/28/2019 : 07:55:11
ok it is using the sagepay payment provider rather than custom so probably that isn't the issue.
Would an update be likely to help or is the mcrypt thing the way to go first
Thanks
|
Andy
ECT Moderator
95440 Posts |
Posted - 05/28/2019 : 08:02:57
I would say the first thing to do is contact your host, let them know the error with PHP7.2 that doesn't happen on 5.6 and hopefully they can fix that for you. While you are waiting updating is a good idea. Andy Please feel free to review / rate our software
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/28/2019 : 08:57:53
Hi Andy
The response from my host was
"....The PHP developers deprecated mcrypt in version 7.1, and removed support for it in version 7.2+ Applications should use either sodium or openssl for encryption needs.
Its basically as obsolete as PHP v5.6 and v7.0"
What would you suggest?
Thanks
|
Andy
ECT Moderator
95440 Posts |
Posted - 05/28/2019 : 09:01:55
|
insight
ECT Moderator
USA
4479 Posts |
Posted - 05/28/2019 : 10:36:08
mcrypt was deprecated, then removed from PHP, starting in version 7. It might be possible to install it manually via PECL, but libmcrypt is really, really old and it's probably not a good idea for a variety of reasons. Short term, you should find it's present in PHP up to and including 7.1 (at least I checked our system and it's there), so I would suggest you go with PHP 7.1 for now as that's still supported and it'll give you time to establish if your code needs updating to use something more up to date than mcrypt. Peter  Professional ecommerce web hosting services Ecommerce Templates specialists since 2003 https://servelink.com
|
Andy
ECT Moderator
95440 Posts |
Posted - 05/28/2019 : 10:38:22
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/28/2019 : 11:46:37
Thanks for the extra info. My host provided a link to some more
https://www.php.net/manual/en/migration71.deprecated.php
I set the version to PHP 7.1 and found that this did work but further into the checkout process showed the error :
"Deprecated: Function mcrypt_encrypt() is deprecated in /home/tqdnqrlt/public_html/vsadmin/inc/inccart.php on line 3268"
It was still possible to complete the checkout process despite this message.
|
insight
ECT Moderator
USA
4479 Posts |
Posted - 05/28/2019 : 12:13:48
Yes, it'll do that if you have the site set to display deprecated warnings, you can turn that off though and it's generally better that you log these privately rather than display them on screen. Your environment is different from ours, so your host can best advise on how to achieve this. Peter  Professional ecommerce web hosting services Ecommerce Templates specialists since 2003 https://servelink.com
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/29/2019 : 02:50:09
Thanks Phil I will give that a try as soon as I've updated.
Andy Going forward will there be a fix to work with php 7.2?
Many thanks
|
Vince
Administrator
42874 Posts |
Posted - 05/29/2019 : 02:53:00
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/29/2019 : 02:56:47
Thanks Vince that's great news.
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 05/29/2019 : 03:02:10
|
Vince
Administrator
42874 Posts |
Posted - 05/29/2019 : 06:09:50
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/29/2019 : 06:24:55
Thanks Vince. I'll update and confirm
Thanks for such a quick response Jo
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/29/2019 : 08:41:57
Hi
I've updated portopolo.com to 7.1 and find that I can't actually add anything to the cart at all. Just nothing happens when I press the Add to Cart button. I have a mini dropdown cart but I notice that there is no updater file for incminidropdowncart.php. Could this be why?
(Also my quantity +/- buttons no longer work and the product images no longer scroll left and right when there are multiple images on the product page.)
Thanks Jo
|
insight
ECT Moderator
USA
4479 Posts |
Posted - 05/29/2019 : 08:42:36
You're missing ectcart.js I expect  See the first post here: https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=110209 Peter  Professional ecommerce web hosting services Ecommerce Templates specialists since 2003 https://servelink.com
Edited by - insight on 05/29/2019 08:44:20
|
townjar
Advanced Member
139 Posts Pre-sales questions only (More Details...)
|
Posted - 05/29/2019 : 08:46:24
No I did copy it over and put it in the js folder
|
|