Upgrade Error.

13 views
Skip to first unread message

Chris Byrd

unread,
Jul 23, 2026, 10:29:29 PM (4 days ago) Jul 23
to Open Source CAD
I installed the upgrade per the video.   The 3.44.3 Cad works correct.   I get the following error from the preflight

=== TicketsCAD upgrade preflight ===

  [✓] PHP version                  8.2.12
  [✓] PHP extensions               all required loaded
  [✓] Database connection          MariaDB/MySQL 10.4.32-MariaDB
  [✓] DB engine version            10.4.32-MariaDB
  [✗] Legacy tables present        missing: user, member, ticket, responder, facilities, action, assigns, allocates, log, settings
       → Restore from a recent backup or contact support
  [!] Data volume                  count failed
       → Tables may be partially missing
  [✓] Disk free for backup         free 614792.1MB
  [✓] RBAC v2 schema state         will be applied during upgrade
  [✓] Timezone alignment           PHP=America/Chicago, DB=-05:00
       → Mismatch is OK — RBAC stores via FROM_UNIXTIME

OVERALL: FAIL — do not run the upgrade until the failures above are resolved.

Eric Osterberg

unread,
Jul 23, 2026, 11:45:12 PM (4 days ago) Jul 23
to open-so...@googlegroups.com
Chris,

Good news first: your data is fine. The clue is in your own message - your 3.44.3 CAD still works correctly. That means those ten tables definitely exist. The preflight just isn't looking at the database they're in.

The preflight examines whichever database the version 4 config.php points at. So it's reporting accurately that the tables aren't there - it's simply looking in the wrong place. Two things cause that, and both have the same fix.

One: the database name doesn't match, because version 4 is pointed at a new empty database rather than your existing one.

Two: your 3.44 install uses a table prefix. If your real tables are named something like cad_user instead of user, version 4 won't recognise them unless it knows that prefix.

To check, open this file from your 3.44.3 folder in Notepad:

incs\mysql.inc.php

You'll see five lines. Two matter:

$mysql_db - the database your working CAD actually uses
$mysql_prefix - the table prefix, often empty, sometimes something like cad_

Then open config.php in your version 4 folder and make these match:

$db_name should equal your $mysql_db
$db_prefix should equal your $mysql_prefix

One important thing before you do: please don't point version 4 straight at your live database and run the upgrade. That's the working system you still have, and I don't want to put it at risk. Do this instead:

In phpMyAdmin, select your working CAD database, go to the Export tab, and save the file.
Create a new empty database called ticketscad_v4.
Select it, go to the Import tab, and import the file you just exported. You now have a complete copy.
Point version 4's config.php at ticketscad_v4, using the same prefix as the original.
Run the preflight again.
That way your 3.44.3 keeps running on its own untouched database, the upgrade happens only on the copy, and if it goes badly you've lost nothing - delete the copy and try again. You can even run the old and new side by side and compare them.

Once preflight passes, send me the output and then go ahead with the upgrade.

One last thing - that message telling you to restore from a backup or contact support was unhelpful, and sent you looking for a problem you don't have. That's on me(ClaudeCode🤪), and I'm changing it to point at the database name and prefix instead. Thanks for flagging it.

Thanks,
Eric



--
You received this message because you are subscribed to the Google Groups "Open Source CAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-source-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open-source-cad/5212d721-0197-4de1-85a1-560ccb19af04n%40googlegroups.com.

Chris Byrd

unread,
Jul 24, 2026, 12:27:01 AM (4 days ago) Jul 24
to Open Source CAD
I got the database created.   I received the following error.  

C:\xampp\htdocs\Tickets\newui>php tools/upgrade/run.php
[23:23:07] === TicketsCAD upgrade orchestrator ===
[23:23:07] Log file: C:\xampp\htdocs\Tickets\newui\tools\upgrade\upgrade-20260723-232307.log
[23:23:07]
[23:23:07] Step 1/8 — preflight


=== TicketsCAD upgrade preflight ===

  [✓] PHP version                  8.2.12
  [✓] PHP extensions               all required loaded
  [✓] Database connection          MariaDB/MySQL 10.4.32-MariaDB
  [✓] DB engine version            10.4.32-MariaDB
  [✓] Legacy tables present        10 tables found
  [✓] Data volume                  3 members, 1 tickets, 8 users
       → Estimated migration time: ~30 seconds
  [✓] Disk free for backup         free 616887.0MB

  [✓] RBAC v2 schema state         will be applied during upgrade
  [✓] Timezone alignment           PHP=America/Chicago, DB=-05:00
       → Mismatch is OK — RBAC stores via FROM_UNIXTIME

OVERALL: PASS — safe to proceed with the upgrade.
[23:23:07]   done in 122ms
[23:23:07] Step 2/8 — database backup
mysqldump: Got error: 1045: "Access denied for user 'newui'@'localhost' (using password: YES)" when trying to connect
[23:23:07]   FAILED: backup produced empty file: C:\xampp\htdocs\Tickets\newui\tools\upgrade/backups/20260723-232307.sql
[23:23:07]   See log: C:\xampp\htdocs\Tickets\newui\tools\upgrade/upgrade-20260723-232307.log
[23:23:07]   Rollback procedure: tools/upgrade/ROLLBACK.md

Tried with --skip-backup then got the following error
[23:24:33] Step 2/8 — backup SKIPPED (--skip-backup) — testing only
[23:24:33] Step 4/8 — install_fresh.php (column patches)
PHP Fatal error:  Cannot redeclare step() (previously declared in C:\xampp\htdocs\Tickets\newui\tools\upgrade\run.php:38) in C:\xampp\htdocs\Tickets\newui\tools\install_fresh.php on line 47

I have confirmed the password is correct and even changed it to be sure.    I also double checked the config.php

Thanks
Chris

Eric Osterberg

unread,
Jul 24, 2026, 12:37:35 AM (4 days ago) Jul 24
to open-so...@googlegroups.com
Chris,

First, the important part: your data is fine, and you have not done anything wrong. You actually found two real bugs in the upgrade tool, and I've fixed both. Thank you - this is genuinely useful.

Here's what happened:

The backup step tried to use a program called mysqldump, which on Windows XAMPP often can't log in even when everything else can - that's the "Access denied" you saw. The tool was supposed to fall back to a built-in backup, but a bug meant the fallback did nothing and left you with an empty file. Fixed.
When you used --skip-backup to get past that, you hit a second bug - the "Cannot redeclare step()" crash. That one stopped the upgrade for everybody, not just you. Also fixed.
Both fixes are done and will be in the next release. But you don't need to wait for that to finish tonight - the individual upgrade steps work fine on their own; it was only the all-in-one command that was broken. Here's the manual path:

Step 1 - Make a fresh safety backup (since the tool's own backup failed). In phpMyAdmin, click your database on the left, click the Export tab at the top, and click Go. Save that file somewhere safe. Now nothing you do next can cost you anything.

Step 2 - Open a Command Prompt and change into your folder:
cd C:\xampp\htdocs\Tickets\newui

Step 3 - Run these three commands, one at a time, in this order:
C:\xampp\php\php.exe tools\install_fresh.php
C:\xampp\php\php.exe tools\upgrade\settings_migrate.php
C:\xampp\php\php.exe tools\migrate_rbac.php

Each should end without errors. install_fresh does the schema updates, the second migrates your settings, the third converts your old user accounts to the new roles system. That is the whole upgrade - the all-in-one tool just runs those same three steps for you.

Step 4 - Open the app in your browser and log in with your existing 3.44 username and password. They carry straight over.

If any of the three commands prints an error, copy the exact text and send it to me - you'd be helping me catch the last rough edges before more people upgrade.

Thanks again for your patience working through this. You've made the upgrade better for everyone who comes after you.

Thanks,
Eric

--
You received this message because you are subscribed to the Google Groups "Open Source CAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-source-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages