Update to CMSB v. 8 from 3.56

5 posts by 3 authors in: Forums > CMS Builder
Last Post: April 11   (RSS)

You need to go to PHP 8.3 at a minimum, as 8.1 and 8.2 are obsolete. You'd better bite the bullet now. 

Jeff Shields
yaadev.com

Hi pgplast,

First, make sure your database is supported by the latest version - you'll want MySQL 5.7+ or MariaDB 10.2+.

But in general, it's pretty straightforward. Backup everything (files and MySQL), upload the new CMSB files over top of the old ones, then upgrade any plugins that need upgrading.

If you run into any PHP 7 to 8 coding errors in your custom code, any of the AI coding agents (Claude, ChatGPT, etc.) can help you come up with a fix pretty quickly.

That said, feel free to fill out a 2nd-level support request if you'd like me to take a look either before or after: https://interactivetools.com/support/request/

Also, feel free to email me at dave@interactivetools.com if you run into any issues. I'll be around this weekend and can help make sure you're back up and running by Monday if needed.

Hope that helps, let me know any questions!

Dave Edis - Senior Developer
interactivetools.com

Thanks very much, Dave. I've done a good number of updates for this site and others in the past. Was just wondering if there were bigtime issues going to PHP 8 or with plugins on which we depend.

Hi pgplast,

Okay, perfect. Since you've done the CMS upgrade before, the CMSB side should be straightforward.

For any custom PHP code or plugins, the most common issue is type handling. PHP 7 was more forgiving - it would silently accept `null` where a string was expected. PHP 8 throws deprecation warnings (and PHP 9 will make them errors).

An example might be @$_REQUEST['city']; if that form field wasn't submitted, it would return null.

So if you see warnings like `trim(): Passing null to parameter #1` or `strlen(): Passing null to parameter #1 ($string) of type string is deprecated`, the fix is usually one of:

// Option A: null coalesce to set a default for null values
$value = trim($record['middle_name'] ?? '');

// Option B: cast to string
$value = strlen((string) $record['notes']);

What I recommend is upgrading, then clicking through all the pages and checking the CMS Developer for any errors.

Let me know if you run into anything specific, and we can help you sort it out.

Dave Edis - Senior Developer
interactivetools.com