Jump to content

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


Recommended Posts


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.


Link to comment
Share on other sites

Here is what we have:

CubeCart Version
PHP Version
MySQL Version
Image folder size
28.92 MB
Download folder size
601.77 KB
Max. Upload filesize
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
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:


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.)




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.

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...