1045 database error message after upgrade

9 posts by 3 authors in: Forums > CMS Builder
Last Post: August 17, 2021   (RSS)

Hi, there. I just did a CMSB upgrade on my client's site, and now I'm getting a 1045 - Access denied for user message.

Does anyone know hot to fix this, please?

http://www.mwisilo.com/index.php

By gkornbluth - August 12, 2021 - edited: August 12, 2021

Hi,

Try renaming your backup settings.dat file from your previous working install (so you don't overwrite it by mistake) and then compare that file to the upgraded on-line version of your settings.dat file (cmsAdmin/data/settings.dat).

My bet is that you'll find differences, especially in the DB area, and those are probably leading to your problem (they have in the past for me).

Also, make sure that all the paths in the new settinbgs.dat file match your current server paths.

Hope that helps,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

I've just realized that the original installation was in a directory called cmsAdmin, whereas the up-to-date version uses a directory cmsb. Should I upload the new software files to cmsAdmin, or create a new directory labelled cmsb?

By daniel - August 16, 2021

Hi CommonSenseDesign,

You should be able to upgrade by replacing the files in your existing folder (cmsAdmin). As always, we recommend making a backup of your files and database prior to upgrading in case there are any issues.

Let me know if you have any other questions!

Thanks,

Daniel
Technical Lead
interactivetools.com

Thanks for the reply, Daniel. Unfortunately, this is now happening:

https://www.mwisilo.com/

https://www.mwisilo.com/cmsAdmin/admin.php

By daniel - August 16, 2021 - edited: August 16, 2021

Hi CommonSenseDesign,

In your first post, your link uses HTTP, whereas these two use HTTPS. When using the HTTPS links I see errors that look related to the SSL certificate, which is unlikely to be related to CMSB. When I use the HTTP link I still see the 1045 database error. 

If you previously had been able to access the site through HTTPS that is likely a separate issue to resolve, likely with your server admin or hosting provider. But I can continue to help troubleshoot the database issue.

Just to cover off some potentially more obvious things:

  • * Can you confirm that the database credentials in the site's settings.dat.php are correct (should be in cmsAdmin/data/)?
  • * Can you copy an example of the "load viewer" block from your existing front-end pages? It should look something like this:
      // load viewer library
      $libraryPath = 'cmsb/lib/viewer_functions.php';
      $dirsToCheck = array('W:/d/test.com/htdocs/','','../','../../','../../../');
      foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
      if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }​
  • * Do you know which old version of CMSB the site was being upgraded from?

Thanks,

Daniel
Technical Lead
interactivetools.com

By CommonSenseDesign - August 17, 2021 - edited: August 17, 2021

Hi, Daniel.

Yes, the details near the top of the code look correct to me.

Here's the load viewer code from my homepage.

// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/services3/webpages/m/w/mwisilo.com/public/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

Sorry, I can't recall which version I had installed previously, but I think it's at least five years old.

By daniel - August 17, 2021

Hi CommonSenseDesign,

This is a curious issue - I think it would be fastest if we're able to look into it directly. Can you send a 2nd level support request (https://www.interactivetools.com/support/request/) and reference this forum post?

Thanks,

Daniel
Technical Lead
interactivetools.com