IlluminateDatabaseQueryException : could not find driver – Laravel 5.8

I have a Laravel 5.8, running locally on my macOS Big Sur 11.4

“laravel/framework”: “5.8.*”,


Terminal

php –version

WARNING: PHP is not recommended                                                                                        
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: May 8 2022 09:40:37) ( NTS )
Copyright (c) 1997-2022 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2022 Zend Technologies

Web Server

I checked phpinfo();, enter image description hereI see

Loaded Configuration File

/Applications/MAMP/bin/php/php7.4.12/conf/php.ini.


....

[PostgreSQL]
; Allow or prevent persistent links.
; http://php.net/pgsql.allow-persistent
pgsql.allow_persistent = On

; Detect broken persistent links always with pg_pconnect().
; Auto reset feature requires a little overheads.
; http://php.net/pgsql.auto-reset-persistent
pgsql.auto_reset_persistent = Off

; Maximum number of persistent links. -1 means no limit.
; http://php.net/pgsql.max-persistent
pgsql.max_persistent = -1

; Maximum number of links (persistent+non persistent). -1 means no limit.
; http://php.net/pgsql.max-links
pgsql.max_links = -1

; Ignore PostgreSQL backends Notice message or not.
; Notice message logging require a little overheads.
; http://php.net/pgsql.ignore-notice
pgsql.ignore_notice = 0

; Log PostgreSQL backends Notice message or not.
; Unless pgsql.ignore_notice=0, module cannot log notice message.
; http://php.net/pgsql.log-notice
pgsql.log_notice = 0

Lately, I can not run php artisan migrate successfully, I kept getting :

IlluminateDatabaseQueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = ‘BASE TABLE’)

I’m using psql not MySQL.

DB_LOCAL_CONNECTION=pgsql
DB_LOCAL_HOST=localhost
DB_LOCAL_PORT=5432
DB_LOCAL_DATABASE=dbName
DB_LOCAL_USERNAME=postgres
DB_LOCAL_PASSWORD=

How can I get it to work again ?

from Newest questions tagged laravel-5 – Stack Overflow https://ift.tt/3oidmut
via IFTTT

Related Posts

Codeigniter : Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in Laravel project

I’m getting following error: **Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE)** Note : It’s working in local but facing issue in production server. private…

Firebase receive notification while tab is active or on focus

What i want is to be able to perform an action when a user receives a notification while the browser is open and tab is active or…

Laravel’s alias loader does not find class

We have a legacy project that we cannot update and we need to make some changes in symfony’s Response.php in vendor. We have solved this by copying…

Laravel 5 – generic document management

I have a system where you can create different types of unique documents. For instance, one document is called Project Identified and this expects certain inputs. Originally,…

Laravel Nova limit the results in indexQuery

I ran intro a situation where I need to limit the results of a resource to only 3 results. To be more specific, based on the logged…

Auditoria en laravel 5.8 [closed]

Cómo puedo automatizar el registro de actividades de un usuario en laravel? Si un usuario ingresa a un app de laravel, debo guardar toda su actividas, a…

Leave a Reply

Your email address will not be published.