version warning - why and how to fix this.

3 posts by 3 authors in: Forums > CMS Builder
Last Post: May 26, 2021   (RSS)

By ITI - March 27, 2021 - edited: March 27, 2021

I installed CMS Builder v3.54 (Build 2280) and got the version warning.

I also checked the 3.55 beta version and it isn't fixed there yet.

The error only applies to MariaDB users not MySQL users.

MariaDB's last version 5 release was 5.5.5. (below the required 5.6 for cmsb 3.54)

Next major version is 10.0 and current version it 10.5.

mysqli()->server_info returns "5.5.5-10.5.9-MariaDB" and after IA's regex is applied we get "5.5.510.5.9 " and fails because it is still less than 5.6

This is how I fixed it and maybe will give IA an idea on how they want to do it.

File: cms/lib/menus/admin/general.php Line: 76

  $currentPhpVersion   = phpversion();
  // $currentMySqlVersion = preg_replace("/[^0-9\.]/", '', mysqli()->server_info);  // replace chars, not numbers and dots.  Returns: 5.5.510.5.9
  /* gma */
  $cVer = mysqli()->server_info;
  if(stripos($cVer,"MariaDB") !== false){
    $cVerArr = explode('-',$cVer);
    $currentMySqlVersion = (count($cVerArr) > 2)? $cVerArr[1] : $cVerArr[0]; // returns 10.5.9 or 5.5.65 
  }else {$currentMySqlVersion = preg_replace("/[^0-9\.]/", '', $cVer);}      // else use IA's method
  // echo $cVer." ======== $currentMySqlVersion";

An intermediate solution.  I think IA's final solution will likely have to have 2 versions numbers to compare since MySQL and MariaDB versioning are now out of sync.

Food for thought.


ITI Internetworking Technologies Inc.

By Dave - May 25, 2021

Hi Glen, 

Just following up on this older thread.  We should have a new beta out in the next couple days and I'll make sure this is resolved.

Thanks for letting us know! 

Dave Edis - Senior Developer

By Jesus - May 26, 2021

This might be related to the same issue ( I'm having so should I install the upcoming beta version you just mention when ready on my live site?

Thank you