PHP db migration problem. #3612

Closed
opened 2026-02-05 07:07:30 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @stustd on GitHub (Mar 13, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

On Ubuntu 22.04, manually installing Bookstack, I encounter a problem with 'php artisan migrate'. Apparently, the PHP SQL driver forgets to quote select strings, i.e (venv-knowhow uses php-8.0.27).

(venv-knowhow) knowhow@ax100:[BookStack]: php artisan migrate
                                                                                                                                                                                                 
                                                                                       APPLICATION IN PRODUCTION.                                                                                        
                                                                                                                                                                                                         
  Do you really wish to run this command? (yes/no) [no]
❯ yes

In Connection.php line 760:
                                                                                                                                                                                                        
  SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = actryx_knowhow_bookstack and table_name = migrations and table_type = 'BASE TABL  
  E')                                                                                                                                                                                                   
                                                                                                                                                                                                        
In Connector.php line 70:
                                                    
  SQLSTATE[HY000] [2002] No such file or directory  

Trying out the proper SQL statement in mysql [MariaDB], I discovered that the quotes were missing around the search strings (actryx_knowhow_bookstack and migrations):

select * from information_schema.tables where table_schema = actryx_knowhow_bookstack and table_name = migrations and table_type = 'BASE TABLE';
ERROR 1054 (42S22): Unknown column 'actryx_knowhow_bookstack' in 'where clause'

Which should have been (note the quotes)

select * from information_schema.tables where table_schema = 'actryx_knowhow_bookstack' and table_name = 'migrations' and table_type = 'BASE TABLE')

Btw I have the same problem with a docker install.

Your help will be much appreciated.

Exact BookStack Version

v23.02.1

Log Content

No response

PHP Version

8.0.27

Hosting Environment

Ubuntu 22.04

Originally created by @stustd on GitHub (Mar 13, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario On Ubuntu 22.04, manually installing Bookstack, I encounter a problem with 'php artisan migrate'. Apparently, the PHP SQL driver forgets to quote select strings, i.e (venv-knowhow uses php-8.0.27). ``` (venv-knowhow) knowhow@ax100:[BookStack]: php artisan migrate APPLICATION IN PRODUCTION. Do you really wish to run this command? (yes/no) [no] ❯ yes In Connection.php line 760: SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = actryx_knowhow_bookstack and table_name = migrations and table_type = 'BASE TABL E') In Connector.php line 70: SQLSTATE[HY000] [2002] No such file or directory ``` Trying out the proper SQL statement in `mysql [MariaDB]`, I discovered that the quotes were missing around the search strings (actryx_knowhow_bookstack and migrations): ``` select * from information_schema.tables where table_schema = actryx_knowhow_bookstack and table_name = migrations and table_type = 'BASE TABLE'; ERROR 1054 (42S22): Unknown column 'actryx_knowhow_bookstack' in 'where clause' ``` Which should have been (note the quotes) ``` select * from information_schema.tables where table_schema = 'actryx_knowhow_bookstack' and table_name = 'migrations' and table_type = 'BASE TABLE') ``` Btw I have the same problem with a docker install. Your help will be much appreciated. ### Exact BookStack Version v23.02.1 ### Log Content _No response_ ### PHP Version 8.0.27 ### Hosting Environment Ubuntu 22.04
OVERLORD added the 🐕 Support label 2026-02-05 07:07:30 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3612