Instance First Run Database Errors #238

Closed
opened 2026-02-04 17:55:15 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @nh-mike on GitHub (Jan 18, 2017).

I am setting up an instance on my local machine on wiki.localhost

My Server Environment is as follows;

  • Windows 7 x64
  • Apache 2.4.17 x86
  • PHP 5.6.23 x86
  • MariaDB 10.1.13 x86

This install is an instance of XAMPP v3.2.2, and I have Mod_Rewrite installed, enabled and working.

I have followed the installation instructions here, which requires the following:

  • Run Composer Install inside the directory to download dependencies
  • copy /.env.example file in root to /.env and fill out MySQL and Mail Server details
  • Ensure /storage, /bootstrap/cache, /public/uploads are all writable
  • run php /artisian key:generate (artisian is a PHP file without the extension in the root dir)
  • Set Document Root to /public directory
  • Run php /artisian migrate

I have done all of these. An extra step, if not using apache or if htaccess is disabled, create my own rewrite rules, I have skipped because, as mentioned, I am running Apache with Mod_Rewrite enabled.

The problem that I am having now, is that while I should be able to access the website from my web browser now, I am being presented with the Laravel "Whoops, looks like something went wrong." page. I have set APP_DEBUG=true in my /.env file, and it gives me a much more descriptive error.

1/2
PDOException in Connection.php line 333:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause'

2/2
QueryException in Connection.php line 761:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause' (SQL: select * from users where system_name = public limit 1)

I have checked my database, and it has been set up and has an administrator record in my users table, but no system_name column.

Short of adding in the column myself or modifying the PHP with no idea what implications it may have further in the code, what can I do? I followed the install instructions to the letter (so I believe), and I would really like to get this project running rather than finding an alternative solution.

Originally created by @nh-mike on GitHub (Jan 18, 2017). I am setting up an instance on my local machine on wiki.localhost My Server Environment is as follows; - Windows 7 x64 - Apache 2.4.17 x86 - PHP 5.6.23 x86 - MariaDB 10.1.13 x86 This install is an instance of XAMPP v3.2.2, and I have Mod_Rewrite installed, enabled and working. I have followed the installation instructions [here](https://www.bookstackapp.com/docs/admin/installation/), which requires the following: - Run Composer Install inside the directory to download dependencies - copy /.env.example file in root to /.env and fill out MySQL and Mail Server details - Ensure /storage, /bootstrap/cache, /public/uploads are all writable - run php /artisian key:generate (artisian is a PHP file without the extension in the root dir) - Set Document Root to /public directory - Run php /artisian migrate I have done all of these. An extra step, if not using apache or if htaccess is disabled, create my own rewrite rules, I have skipped because, as mentioned, I am running Apache with Mod_Rewrite enabled. The problem that I am having now, is that while I should be able to access the website from my web browser now, I am being presented with the Laravel "Whoops, looks like something went wrong." page. I have set APP_DEBUG=true in my /.env file, and it gives me a much more descriptive error. **1/2** *PDOException in Connection.php line 333: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause'* **2/2** *QueryException in Connection.php line 761: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'system_name' in 'where clause' (SQL: select * from `users` where `system_name` = public limit 1)* I have checked my database, and it has been set up and has an administrator record in my users table, but no system_name column. Short of adding in the column myself or modifying the PHP with no idea what implications it may have further in the code, what can I do? I followed the install instructions to the letter (so I believe), and I would really like to get this project running rather than finding an alternative solution.
OVERLORD added the 🐕 Support label 2026-02-04 17:55:15 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 18, 2017):

Hi @nh-mike, Sorry to hear you're about the issue you're having.

When you run php artisan migrate is there any error output on the command line?

Would you be able to post what's in your migrations SQL table?

From what you've written it almost seems like some of the latest database migrations have not run.

@ssddanbrown commented on GitHub (Jan 18, 2017): Hi @nh-mike, Sorry to hear you're about the issue you're having. When you run `php artisan migrate` is there any error output on the command line? Would you be able to post what's in your `migrations` SQL table? From what you've written it almost seems like some of the latest database migrations have not run.
Author
Owner

@nh-mike commented on GitHub (Jan 18, 2017):

Hi

Thanks for your reply.

In deleting all the tables and re-running php artisan migrate, it has created all the tables, most of which were not there previously. I had already done this again but maybe I had not cleared the database correctly or something, as it didn't create the full database again.

This time I am presented with a login page. Thank you very much!

@nh-mike commented on GitHub (Jan 18, 2017): Hi Thanks for your reply. In deleting all the tables and re-running php artisan migrate, it has created all the tables, most of which were not there previously. I had already done this again but maybe I had not cleared the database correctly or something, as it didn't create the full database again. This time I am presented with a login page. Thank you very much!
Author
Owner

@ssddanbrown commented on GitHub (Jan 18, 2017):

@nh-mike Awesome, Glad to hear that worked!

@ssddanbrown commented on GitHub (Jan 18, 2017): @nh-mike Awesome, Glad to hear that worked!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#238