antedebaas / Viesti-Reports

DMARC & SMTP-TLS Reports processor and visualizer and BIMI file hoster
https://docs.viestireports.com/
GNU Affero General Public License v3.0
81 stars 16 forks source link

SQL Error When Setting Up Viesti Reports #151

Closed daygle closed 2 months ago

daygle commented 2 months ago

Describe the bug I am attempting to setup Viesti Reports on a clean Ubuntu 24.04 server. That said, I am unable to get past the setup screen ' Checking if database schema is up to date: Updates found.

It almost appears that Viesti Reports is trying to run a SQLlite script on my MySQL database although I have selected MySQL. See error below:-

Are you using the Docker image?

Database used

Webserver used (when not using docker)

Error Messages

From Apache2 Error Log:-

[Sun Sep 01 23:38:41.973640 2024] [php:notice] [pid 5855] [client 192.168.20.45:55411] [critical] Error thrown while running command "doctrine:migrations:migrate --no-interaction". Message: "An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AUTOINCREMENT NOT NULL, report_id INTEGER NOT NULL, source_ip VARCHAR(255) NOT N' at line 1", referer: http://192.168.20.204/public/index.php/setup

Expected behavior Setup updates MySQL database correctly.

Screenshots image

antedebaas commented 2 months ago

Try running php bin/console cache:clear and let me know if that fixes it

daygle commented 2 months ago

@antedebaas Thanks for getting back to me so fast.

Unfortunately that didn't fix it. I should mention that I have a separate mysql server which hosts the database - that shouldn't cause any issues right. I know it is able to connect.

daygle commented 2 months ago

@antedebaas I found out what is causing this. Basically removing the .env.test file allows me to update SQL.

Perhaps this needs to be removed from the repository?

daygle commented 2 months ago

@antedebaas Actually I had to also copy contents of .env.local and paste in to .env as well.

daygle commented 2 months ago

Actually, I'll close this case. Docker is so much easier than without docker.