Problem with extension of Postgres PDO

Asked

Viewed 789 times

1

Use apache+php7+postgres on Ubuntu and it works well.

But now wanted to do the installation by hand on Windows 8.1 and found a problem:

I installed Apache 2.4, PHP 7.1, and Postgres.

Apache worked well, but when I test my project generates the following error:

Error: could not find driver Missing connection!

At the beginning of my httpd.conf

AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/php711/php7apache2_4.dll"
PHPIniDir "c:/php711"

In my php.ini are discolored:

extension=php_openssl.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

I don’t know if this image helps, but in phpinfo() Give me that back!

Trecho do phpinfo()

  • How is config extension_dir ? try to place the full path to the Extensions directory and restart apache (important to restart).

  • 1

    Good morning, before the PDO make sure you have the pgsql installed and configured correctly, you can run php.exe directly on the Windows command line, try php --ri pgsql, at the beginning should include something like Postgresql Support => enabled, then comes the version and other information.

  • I don’t know if that’s it, but you’ve already checked to see if there are any. dlls, in system32, because with you did the individual installation of Apache 2.4, PHP 7.1, and Postgres the drives may not have been incorporated into windows, try to copy the dll you have discovered there in php.ini that are in php/ext/ for system32 and or sysWOW64 (64bits), or if you have an immediate need to resolve this situation, install xampp or wamp, I believe that both can already create the complete environment you seek. Download Xampp: https://www.apachefriends.org/pt_br/download.html

  • @Fernandomertins when I put this command, it generates a lot of errors, but I found that it looks at: C: php ext... And my php folder is C: php771

  • Hello, what errors...? I have now tested in a Win7 but with PHP 5.5 and should show Extension 'pgsql' not present. ~or~ lib information. Suggestion from scratch... good luck.

  • I’ve made it from scratch 2x :/

  • Do you have a WAPP server? You have a Bitnami server, but there’s another problem with Ubuntu?

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.