sean1688 Posted January 31, 2022 Share Posted January 31, 2022 Hello, our website has been working for a long time, but today we just uncovered a strange issue, here is the message: Deprecated: Function create_function() is deprecated in /home/xxx/public_html/classes/config.class.php on line 248 can someone please help? thanks in advance. Sean Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2022 Share Posted January 31, 2022 That has probably been fixed in the later versions of CubeCart. Please let us know what version you are running. Link to comment Share on other sites More sharing options...
sean1688 Posted January 31, 2022 Author Share Posted January 31, 2022 thanks for your reply. this is what I found under maintenance: ----- Upgrade log to 5.2.16 (10 Jan 2015 - 14:47:16) ----- Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2022 Share Posted January 31, 2022 On the admin's Dashboard, Store Overview tab, please let us know what it says for CubeCart Version. And PHP Version. Link to comment Share on other sites More sharing options...
sean1688 Posted January 31, 2022 Author Share Posted January 31, 2022 Here is what we have: CubeCart Version 5.2.16 PHP Version 7.2.34 MySQL Version 5.5.5-10.3.27-MariaDB-log Image folder size 28.92 MB Download folder size 601.77 KB Max. Upload filesize 512M Browser user-agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Server Software Apache Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2022 Share Posted January 31, 2022 There is going to be some work involved in getting CC5216 compatible with PHP7. Are you able to make the decision to move back to PHP5? Link to comment Share on other sites More sharing options...
sean1688 Posted January 31, 2022 Author Share Posted January 31, 2022 I asked the hosting company to roll back to php 5.6 and the problem went away for now. is there a way to avoid this in the future? Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2022 Share Posted January 31, 2022 As the features and functions of future versions of PHP change, so must the applications that run on it. Your choices: Stay with PHP5 Upgrade CubeCart to CC6 Work through CC5 to make it compatible with PHP7 Each has its significant pro's and significant con's. Experiments have begun to see what crashes when CC6 is run under PHP8.1. Also, please read: https://forums.cubecart.com/topic/50278-cubecart-607-5217-released/ https://forums.cubecart.com/topic/50277-critical-security-issue-admin-account-hijack/ You should determine if the code edit detailed in these topics have been implemented, and if not, do so now. Link to comment Share on other sites More sharing options...
sean1688 Posted January 31, 2022 Author Share Posted January 31, 2022 Thanks! we would like to do Work through CC5 to make it compatible with PHP7 if possible. If I remember correctly, we tried to upgrade to CC6 and somehow it did not work. Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2022 Share Posted January 31, 2022 "somehow it did not work." Did you start a conversation on the forums regarding this? Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 1, 2022 Share Posted February 1, 2022 9 hours ago, sean1688 said: Thanks! we would like to do Work through CC5 to make it compatible with PHP7 if possible. If I remember correctly, we tried to upgrade to CC6 and somehow it did not work. Unless you have extensive custom code changes to your current CC5 store, the MUCH preferable solution would be to upgrade to latest CubeCart version and stay on the latest version of PHP. As Brian has said, there will be significant work involved in the other choice with still a lot of serious issues. Upgrading will have a few steps needed depending on any plugins and which skin you are using as well as any code changes you have had done Link to comment Share on other sites More sharing options...
bsmither Posted February 5, 2022 Share Posted February 5, 2022 "We would like to do 'Work through CC5 to make it compatible with PHP7' if possible." Here is a text file (zipped) that has edits to CC5216 that will let it run under PHP7.4 or earlier. It also has the critical security fix (you may have already implemented it). I also gave edits for bug fixes present in CC5216 that carried over to, and were fixed in, CC6. Do the edits in order, for the sole reason that as statements get added or deleted, line numbers will change. (And, depending on whether there are any customizations you've made, realize the line numbers are approximate.) CC5216toPHP74.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.