Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL Cannot Find Driver problem. #404

Open
MarkAusten opened this issue Apr 6, 2022 · 0 comments
Open

PostgreSQL Cannot Find Driver problem. #404

MarkAusten opened this issue Apr 6, 2022 · 0 comments

Comments

@MarkAusten
Copy link

I have a peculiar problem with LZ that I cannot figure out. I develop on a MacBook Air and have php 8.1 installed with both pgsql and pdf_pgsql drivers installed. I have verified that these work by connecting to a PostgreSQL database using a standard Laravel application. So all the appropriate configuration files are set up correctly, the drivers located and installed.

However, trying to connect to the same database with the same connection settings and SQL select command in LZ gives me the dreaded 'cannot find driver error' when trying to create a new PDO object (Connector.php line 70).

However, if I copy the LZ application to a Windows machine there is no problem connecting to the PostgreSQL database.

The line that chokes is:

return new PDO($dsn, $username, $password, $options);

This can be found in the createPdoConnection method in Illuminate\Database\Connectors\Connector.php.

To summarise, the above line works connecting to a PostgreSQL database in LZ and Laravel when on Windows and in Laravel on MacOS but not for LZ on MacOS. The parameters are identical in all four installations and the database is a remote database on a separate server accessible to both the windows and Mac PCs.

As an aside, just in case this matters, both MySql and SQL server connections do not exhibit this behaviour, just PostgreSQL.

Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant