Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table prefix and installation problem (QueryException in Connection.php) #2319

Closed
2 tasks done
ObservEnR opened this issue Jul 26, 2016 · 0 comments
Closed
2 tasks done

Comments

@ObservEnR
Copy link

Expected Behavior (or desired behavior if a feature request)

Create Database Tables during the step 2 of the installation (pre flight) using the manual installation.


Actual Behavior

It creates only the few first table, and then stop the installation process due to errors (Query and PDO Exception in Connection.php see below)


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running >> v3.0
  • What OS and web server you're running Snipe-IT on >> Linux Ubuntu 14.04.1
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) >> Manual Install
  • If you're getting an error in your browser, include that error >> Shows 2 errors

1/2
QueryException in Connection.php line 713:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipe_it.groups' doesn't exist (SQL: update groups set permissions = {"admin":1,"users":1,"reports":1} where id = 1)

2/2
PDOException in Connection.php line 462:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipe_it.groups' doesn't exist

  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error >> public/setup/ (first step OK with everything in green)
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

After some digging I think I have identified the problem. The error show a table called "snipe_it.groups". The "snipe_it" part is normal, it's the name of the database, but I was quite surprised by the second part as it didn't include the prefix of the table (in my case : "SnipeIT_").

I check through PHPMyAdmin, and all the tables allready created (a few of them before it stopped with groups) were including the prefix of the table, as forecasted/intended.

So my guess was that the "groups" table is created and/or accessed without the prefix, which explains the error. I tried to run it without the preffix set in the .env file and it worked like a charm !

I just wanted to let you know, beacause I spent a few hours about it, and it will be great if it won't append to anybody else :)

@snipe snipe closed this as completed in 9a9b214 Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant