私はPHP 5.5.36は、Mac(OSX 10.10.5)上で実行されているとMacでPosgresにアクセスするためのPDOドライバfor PHP 5.5をインストールするには?
brew install homebrew/php/php55-pdo-pgsql
とPDOドライバをインストールしているが、ライン
$dbh = new PDO("postgres://localhost:5432");
を実行するとエラーが発生します。
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Users/zaitsev/tests/pg-php/pdo-test.php:2
Stack trace:
#0 /Users/zaitsev/tests/pg-php/pdo-test.php(2): PDO->__construct('postgres://loca...')
#1 {main}
thrown in /Users/zaitsev/tests/pg-php/pdo-test.php on line 2
ドライバをインストールするために何か他に必要なことはありますか?
[Postres/PDO DSN](http://php.net/manual/en/ref.pdo-pgsql.connection.php) –
@ LucasKrupinskiありがとうございます。ありがとうございます。 –
[PDOStatement](http://php.net/manual/en/class.pdostatement.php)のPDOドキュメントにはコメントの例がありますが、その時点では、PDOの例は、クエリはPostgresが理解できない構文を使用しません。 –