Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 611 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I enable php to work with postgresql?

#11
$dbh = new PDO('pgsql:host=localhost;port=5432;dbname=###;user=###;password=##');

For PDO type connection uncomment

`extension=php_pdo_pgsql.dll` and comment with

`;extension=php_pgsql.dll`

$dbh = pg_connect("host=localhost dbname=### user=### password=####");
For pgconnect type connection comment

`;extension=php_pdo_pgsql.dll` and uncomment

`extension=php_pgsql.dll`

Both the connections should work.



Reply

#12
I installed PHP on windows IIS using Windows Platform Installer (WPΙ). WPΙ creates a "PHP Manager" tool in "Internet Information Services (IIS) Manager" console. I am configuring PHP using this tool.

in

[To see links please register here]

says:

*PDO and all the major drivers ship with PHP as shared extensions, and simply need to be activated by editing the php.ini file:
extension=php_pdo.dll*

so i activated the extension using PHP Manager and now PDO works fine

PHP manager simple added the following two lines in my php.ini, you can add the lines by hand. Of course you must restart the web server.

[PHP_PDO_PGSQL]
extension=php_pdo_pgsql.dll

Reply

#13
Because some answers seem outdated, if you are working with xampp, go to the `php` folder inside your xampp installation. In it open the `php.ini` file and uncomment

extension=pdo_pgsql
extension=pdo_sqlite

Remove the `;` before these lines.
Reply

#14
If you're using AppServ on Windows, then:

**To Enable PHP to work with PostgreSQL in Apache**

1. Go to `C:\AppServ\php7\php.ini`.
2. Uncomment this line: `;extension=pgsql` removing the `;`.

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through