Could not find driver issue #4787

Closed
opened 2026-02-05 09:15:35 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @athornfam2 on GitHub (May 21, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

After updating to the latest security release and following update instructions like normal I was greeted with this page.

image

This an issue I get after running php artisan migrate (something I needed to do before when I had a similar issue to the image above - https://github.com/BookStackApp/BookStack/issues/4098#issuecomment-2018099147)

image

Exact BookStack Version

v24.05.1

Log Content

Apache Log

[Tue May 21 00:00:02.235506 2024] [mpm_prefork:notice] [pid 971] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal ope>
[Tue May 21 00:00:02.235563 2024] [core:notice] [pid 971] AH00094: Command line: '/usr/sbin/apache2'

Laravel Log

[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.logga>
[stacktrace]
[2024-05-21 15:05:42] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.loggable_id' in 'where >
[stacktrace]
[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.logga>
[stacktrace]
[2024-05-21 15:14:51] production.ERROR: could not find driver (Connection: mysql, SQL: select table_name as `name`, (data_length +>
[stacktrace]
[previous exception] [object] (PDOException(code: 0): could not find driver at /var/www/bookstack/vendor/laravel/framework/src/Ill>
[stacktrace]
[2024-05-21 15:44:30] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.loggable_id' in 'where >
[stacktrace]
[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.logga>
[stacktrace]

Hosting Environment

PHP 8.3.6 on Ubuntu 22.04.4 LTS. The server is hosted on ESXi with a local database with no proxy.

Originally created by @athornfam2 on GitHub (May 21, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario After updating to the latest security release and following update instructions like normal I was greeted with this page. ![image](https://github.com/BookStackApp/BookStack/assets/74559383/66a1be94-0507-45ad-8595-b4450df10760) This an issue I get after running php artisan migrate (something I needed to do before when I had a similar issue to the image above - https://github.com/BookStackApp/BookStack/issues/4098#issuecomment-2018099147) ![image](https://github.com/BookStackApp/BookStack/assets/74559383/da48a493-6543-4351-a5f1-fd26b84dea44) ### Exact BookStack Version v24.05.1 ### Log Content Apache Log ``` [Tue May 21 00:00:02.235506 2024] [mpm_prefork:notice] [pid 971] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal ope> [Tue May 21 00:00:02.235563 2024] [core:notice] [pid 971] AH00094: Command line: '/usr/sbin/apache2' ``` Laravel Log ``` [previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.logga> [stacktrace] [2024-05-21 15:05:42] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.loggable_id' in 'where > [stacktrace] [previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.logga> [stacktrace] [2024-05-21 15:14:51] production.ERROR: could not find driver (Connection: mysql, SQL: select table_name as `name`, (data_length +> [stacktrace] [previous exception] [object] (PDOException(code: 0): could not find driver at /var/www/bookstack/vendor/laravel/framework/src/Ill> [stacktrace] [2024-05-21 15:44:30] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.loggable_id' in 'where > [stacktrace] [previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'activities.logga> [stacktrace] ``` ### Hosting Environment PHP 8.3.6 on Ubuntu 22.04.4 LTS. The server is hosted on ESXi with a local database with no proxy.
OVERLORD added the 🐕 Support label 2026-02-05 09:15:35 +03:00
Author
Owner

@ssddanbrown commented on GitHub (May 22, 2024):

Hi @athornfam2,

  • Did you perform a PHP update as part of the upgrade process? If so, what steps did follow for that?
  • Please confirm the exact output of php -v and php -m.
@ssddanbrown commented on GitHub (May 22, 2024): Hi @athornfam2, - Did you perform a PHP update as part of the upgrade process? If so, what steps did follow for that? - Please confirm the exact output of `php -v` and `php -m`.
Author
Owner

@athornfam2 commented on GitHub (May 22, 2024):

I don't believe I had done anything related to php updates this go around. I remember when the last bump occurred I had updated to the latest 8.0+ release in the past 2-3 months.

PHP -V
root@bookstack:/# php -v PHP 8.3.6 (cli) (built: Apr 11 2024 20:23:38) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.6, Copyright (c) Zend Technologies with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies

PHP -M
`root@bookstack:/# php -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
openssl
pcntl
pcre
PDO
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
`

Composer
sudo composer self-update You are already using the latest available Composer version 2.7.6 (stable channel).

@athornfam2 commented on GitHub (May 22, 2024): I don't believe I had done anything related to php updates this go around. I remember when the last bump occurred I had updated to the latest 8.0+ release in the past 2-3 months. PHP -V `root@bookstack:/# php -v PHP 8.3.6 (cli) (built: Apr 11 2024 20:23:38) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.6, Copyright (c) Zend Technologies with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies ` PHP -M `root@bookstack:/# php -m [PHP Modules] calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv json ldap libxml openssl pcntl pcre PDO Phar posix random readline Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache ` Composer `sudo composer self-update You are already using the latest available Composer version 2.7.6 (stable channel). `
Author
Owner

@ssddanbrown commented on GitHub (May 22, 2024):

@athornfam2 Looks like you're missing mysql extensions for the installed PHP version. Try installing the mysql extension (typically sudo apt install php8.3-mysql then re-attempt all update steps), then restart apache sudo systemctl restart apache2.service.

@ssddanbrown commented on GitHub (May 22, 2024): @athornfam2 Looks like you're missing mysql extensions for the installed PHP version. Try installing the mysql extension (typically `sudo apt install php8.3-mysql` then re-attempt all update steps), then restart apache `sudo systemctl restart apache2.service`.
Author
Owner

@athornfam2 commented on GitHub (May 23, 2024):

Thanks @ssddanbrown. That fixed the issue.

@athornfam2 commented on GitHub (May 23, 2024): Thanks @ssddanbrown. That fixed the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4787