Jump to content

Help needed regarding "Deprecated: Function create_function() is deprecated ...


sean1688

Recommended Posts

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

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

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

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

"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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...