PostgreSQL, WAMP, Laravel 5.5 - "php artisan migrate" throwing "driver not found" exception - postgresql

I'm getting the "Driver not found" PDO exception when trying to connect to PostgreSQL DB and I can't seem to figure out what's happening. Here are system specs:
WampServer Version 3.0.3 64bit
PHP 7.1.10
Apache 2.4.9
Laravel 5.5
I downloaded PosgtreSQL 10 (Windows x86-64) from here - EnterpriseDB
Here are all the relevant screenshots:
extension_loaded('pgsql')
returns true
The only discrepancy that I see is that I downloaded PostgreSQL 10, and PHP Info says PostgreSQL(libpq) Version is 9.6.2. Could that be an issue?
EDIT:
I replaced PostgreSQL 10 with 9.6.5 (which is the only available 9.6 version), and it didn't fix the issue.
EDIT 2:
$dbh = new PDO("pgsql:dbname=laravel_admin_api;host=127.0.0.1", "postgres", "admin");
echo $dbh ? "connected" : "failed";
returns connected. So it's gotta be a Laravel issue?
EDIT 3:
Ok, so the connection to the database works, I created a table and inserted a row manually through pgAdmin, and then called
\App\User::all()->toArray()
and that worked. So it's actually php artisan migrate that's having issues, and throwing the could not find driver exception. Still stumped on that one.

I was facing the same issue and I tried couple of solutions through the internet. None of those worked for me and finally I could get it to work by installing Apache 2.4 and php 7.2.7 separately instead of using Xamp or Wamp on windows. Sharing most important steps so that it might be helpful for anyone out there.
Install Apache as per https://www.sitepoint.com/how-to-install-apache-on-windows/. In my case I installed Apache 2.4
Install PHP as an Apache module - https://www.sitepoint.com/how-to-install-php-on-windows/ (I downloaded PHP thread safe version for Windows 64)
If you get both of above to work properly. Install Laravel in the htdocs and try php artisan migrate command.

Related

"su: cannot open session: Module is unknown" error when starting JasperServer 8.0.x Community Edition

I'm having some issues after installing JasperServer Community Edition 8.0.
When I try to run ctlscript.sh start, I get the following error message:
su: cannot open session: Module is unknown
<INSTALL_PATH>/postgresql/scripts/ctl.sh : postgresql  could not be started
and the PostgreSQL included in the installation does not start.
I tried debugging the startup code, and it seems that the issue is in file <INSTALL_PATH>/postgresql/scripts/ctl.sh, at line 63:
su postgres -c "$POSTGRESQL_START"
Just to let you have the complete context, I already have a Jasper Server at version 7.8 running on this server, using the same postgres user as the new 8.0 one. I'm not sure if it's a session issue.
Could you please help me figure out what's the problem?
Thanks a lot
Edit: I forgot to mention that the server is running RedHat 8.6

Uninstall Postgres ODBC/JDBC driver on Mac (iOS). Error: "Current transaction is aborted" (Tableau)

I am getting the following error on Tableau:
"ERROR: current transaction is aborted, commands ignored until end of transaction block; Error while executing the query"
I reinstalled the latest version of PostgreSQL (13.3) as recommended in this article but I get the same error
I think I have the wrong Postgres ODBC driver installed and I need to uninstall it. There may also be a problem with how the JDBC driver is installed.
How can I uninstall Postgres ODBC/JDBC driver on Mac (iOS)?
I had the similar problem & issue was with the driver.
I downloaded the driver from : https://www.tableau.com/support/drivers?_ga=2.40526434.1567909167.1642407920-2139636933.1641279633
and placed it in the Driver folder(~Library/Tableau/Drivers).
This resolved my issue.

Unable to connect to postgresql with pgAdmin4: readonly attribute error

I have a local postgresql 10 server (tested the same on 9.6, don't think it's related to the DB at all, only to pgAdmin4, as pgAdmin3 works just fine)
As in the screenshot, I am trying to connect to the localhost db with user postgres on a fresh installation, but I keep receiving this message:
readonly attribute
I searched everywhere for this error, but couldn't find any useful solutions or workarounds
pg4Admin 4 now is working for me. I got an update of python-psycopg2 to 2.7.4-1.pgdg16.04+1 amd64 version on my KDE Neon, that solved, to me, the readonly attribute problem.
This error is related to psycopg2. Please verify the version of psycopg2 installed on your system and update it to at least version 2.7.
At version 2.7 psycopg2 connection class the notices attribute is writable. On earlier versions it is a read only attribute.
If you comment the code in line 313 of /usr/share/pgadmin4/web/pgadmin/utils/driver/psycopg2/connection.py you could check it out.
#pg_conn.notices = deque([], self.ASYNC_NOTICE_MAXLENGTH)
You can try using pgAdmin4 wheel file, you will not face any such issues of an older version of packages from the native repo.
https://askubuntu.com/questions/831262/how-to-install-pgadmin-4-in-desktop-mode-on-ubuntu
I am on Ubuntu 16.04, but using postgresql and pgAdmin from apt.postgresql.org. I struck this bug. But the new version of psycopg2 that came through with the latest apt update solved the problem for me.

PostgreSQL ERROR: Could not load library postgis-2.1.dll

I'm using pgAdmin III to connect to my PostgreSQL database (Postgres) and I'm trying to add an extension to the database which is Postgis.
Even though the "missing" file is in the folder the following message error shows:
"ERROR: Could not load library "C:/Program Files/PostGreSQL/9.4/lib/postgis-2.1.dll": unknown error 193."
Can anyone help me?
The windows version is not mentioned. With win 7 check wether postgis is installed. Remove it. From http://download.osgeo.org/postgis/windows/ get the right postgis installer and install new, then start in pgadmin with 'create extension postgis;'.
For me, the error "unknown error 193" occured since I installed a 64-bit version of PostgreSQL but tried to use the 32-bit version of PostGIS (somewhere I read that the 64-bit version would not work properly, but that was in 2011 and now it does).
For me it finally worked when I:
1. removed the existing PostGIS installation (Control Panel -> Programs)
2. shutdown the PostgreSQL service
3. installed the 64-bit version of PostGIS (2.1.3, Postgre in 9.3)
4. restarted the PostgreSQL service
5. installed the extension via PgAdmin III

Magento 1.7.2 Install Error with curl -- Desperate

I am using WampServer Apache 2.2.22 – Mysql 5.5.24 – PHP 5.4.3 XDebug 2.1.2 XDC 1.5 PhpMyadmin 3.4.10.1 SQLBuddy 1.3.3 webGrind 1.0.
Error 1: I get the following error. PHP extension "curl must be loaded.
So I go to wamp\bin\php\php5.4.3 and uncomment line extension=php_curl.dll.
Restart wamp server
Error 2: [1]: http://imgur.com/wdmMP2z
PHP Statup Unable to load dynamic library.
c:/wamp/bin/php5.4.3/ext/php_curl.dll The application failed to start because its side by side configuration is incorrect.
I tried to go to this site and get the corrected php
http://www.anindya.com/php-5-4-12-and-5-3-22-x64-64-bit-for-windows/
So i just extracted it and replaced it in c:\wamp\bin\php\php5.4.3
Also tried just having it overwrite the folder. Neither worked.
Thanks for any help.
New to Magento
Sincerely,
Joe
Seems that others have had problems with Magento 1.7.x and newer versions of WAMP. This answer here says they had to go back to WAMP 2.1:
Magento 1.7 with Wamp 2.2
I'm having a curl related problem with Magento 1.6.x and WAMP 2.2 using php 5.4.3 -- I believe I used the older php 5.3.10 when I had it successfully working..
edit: for magento 1.6.2.0 anyway, you need php 5.3.10 which is in WampServer 2.2D (not E)