Closed stustd closed 1 year ago
Apparently, the PHP SQL driver forgets to quote select strings
I wouldn't get to fixed upon this element, It's likely just due to how the queries are presented in log output, it does not reflect the exact data/communication with the MySQL database.
The SQLSTATE[HY000] [2002] No such file or directory
error commonly occurs when the database is not accessible by BookStack (eg. Not running, not accessible over network, wrong port/host used).
What exactly is being used to manage the venv
as suggested in the post, and where does the database exist in relation to the BookStack installation?
PHP Version 8.0.27
Unrelated, but it's probably better just using the Ubuntu 22.04 default (8.1) or use 8.2 if you can configure flexibly, so that you won't have to upgrade just in a years time (Assuming PHP is only used for BookStack in this environment).
I'm now using stock php (8.1.2) on Ubuntu 22.04 (... no venv
anymore, which only redirected to php 8.0.27, ... which I tried as that's the one mentioned in the Manual Install guide). Further, user (root) has db access from knowhow
account. Now,
php artisan migrate
gives:
knowhow@ax100:~/src/bookstack/repo/BookStack$ php artisan migrate
PHP Warning: Missing arginfo for Sass::compile_file() in Unknown on line 0
APPLICATION IN PRODUCTION.
Do you really wish to run this command? (yes/no) [no]
❯ yes
INFO Nothing to migrate.
knowhow@ax100:~/src/bookstack/repo/BookStack$
... still a problem...
Ok, making progress; now a Symphony exception in the browser:
@stustd That indicates a potential permission issue. Check the web-server has the ability to write to the required locations: https://www.bookstackapp.com/docs/admin/filesystem-permissions/
I have no idea where the previous Missing arginfo for Sass::compile_file()
warning is coming from though.
Indeed: bootstrap/cache
needed +x
permission for nginx
. Thanks.
Will therefore close this off.
I had a similar message during the update and found this similar entry in the google search. I had to run the following command: "sudo apt install php-mysql"
This error was then corrected with "php artisan migrate".
In Connection.php line 760:
could not find driver (SQL: select * from information_schema.tables where t
able_schema = bookstack and table_name = migrations and table_type = 'BASE
TABLE')
In Connector.php line 70:
could not find driver
Maybe it will help someone if he finds the problem here.
Attempted Debugging
Searched GitHub Issues
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).
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):Which should have been (note the quotes)
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