Skip to content

SQLite database restore fails in Backup Manager with Evolution CMS Parse Error on serialized settings values #2349

@another-brick-in-the-wall

Description

Description:

After restoring a backup in Evolution CMS with the SQLite driver, the manager throws:

Evolution CMS Parse Error
SQLSTATE[HY000]: General error: 1 unrecognized token ...

The error occurs during backup restore in the Backup Manager and appears to be caused by the SQL importer splitting the dump into statements incorrectly. A serialized value in osns_system_settings.sys_files_checksum contains semicolons and quoted strings, which breaks the parser and truncates the SQL statement.

Steps to Reproduce:

  1. Use Evolution CMS with SQLite.
  2. Create a database backup from the manager (Tools > Backup)
  3. Restore the backup through Backup Manager.
  4. The restore fails with an SQL parse error.

Expected Behavior:

The backup should restore successfully without SQL parsing errors.

Actual Behavior:

Restore fails with:

SQLSTATE[HY000]: General error: 1 unrecognized token

The failing SQL usually points to the sys_files_checksum setting, which contains serialized data.

Image Image

Environment:

  • Evolution CMS 3.5.6
  • SQLite database
  • PHP 8.4
  • Windows / OSPanel
  • Backup Manager restore flow

Additional Notes:

The issue seems specific to SQLite restore logic. The SQL dump itself is valid, but the current importer splits statements in a way that breaks serialized values containing ; and embedded quotes.

Possible Fix:

For SQLite restores, execute the full dump as one SQL script instead of splitting it into individual statements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions