Support the ongoing development of Laravel.io →
Laravel Database

On my Windows 11, I have PostgreSQL 17.4 and pgAdmin 4 v9.0

Installed PHP and Composer using the Windows Powershell command https://laravel.com/docs/11.x/installation#installing-php Note that the script referenced by the above command https://php.new/install/windows has only three lines to create php.ini

(I am using the utility Cmder, a Consule Emulator on Windows to run unix like commands below).

C:\Users\john
λ php --ini
Configuration File (php.ini) Path:
Loaded Configuration File:         C:\Users\john\.config\herd-lite\bin\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

C:\Users\john
λ cat C:\Users\john\.config\herd-lite\bin\php.ini
variables_order = "GPCS"
opcache.enable=1
opcache.enable_cli=1

C:\Users\john
λ php -m | grep pdo
pdo_mysql
pdo_sqlite

Online posts recommend commenting out the line from php.ini file, but there are only 3 lines, none related to drivers.

If I continue to install a Laravel app using the command laravel new example-app, during the wizard, I see the message [pgsql ] PostgreSQL (Missing PDO extension)

 Which database will your application use? [SQLite]:
  [sqlite ] SQLite
  [mysql  ] MySQL
  [mariadb] MariaDB
  [pgsql  ] PostgreSQL (Missing PDO extension)
  [sqlsrv ] SQL Server (Missing PDO extension)

I want to use Artisan (not Apache) and want php to work with PostgreSQL. I don't want to use Herd Pro either. How can I make the PHP include the pdo_pgsql?

Last updated by @ysrinu 2 months ago.

dev-cristiano liked this thread

1

Did you put your PHP on local disk C and reference it in your computer's global variables? If so, open its php.ini and remove the ; from the pgsql drive. before: ;extension=pgsql after: extension=pgsql

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Sri ysrinu Joined 22 Feb 2025

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.