I am working with mapbender3 which is developed in symfony2 on my local machine. I am asked to connect the application to a remote potgreSQL server. Following is the configuration in the parameters.yml file.
parameters:
database_driver: pdo_pgsql
database_host: 192.168.3.100
database_port: 5434
database_name: idc_core
database_path: ~
database_user: *******
database_password: *******
mailer_transport: smtp
mailer_host: localhost
mailer_user: ~
mailer_password: ~
But when I run the command:
php app/console doctrine:database:create
I keep getting the below error
could not create database for connection named "idc_core"
cound not find driver
I am using WAMP server on windows 7 and the driver pdo_pgsql shows active and running on my local computer.
I have checked phpinfo() and it displayed pdo_pgsql as enabled but when I run php -m
in commandline to see the modules compiled in,
I can see PDO, pdo_mysql and pdo_sqlite but not pdo_pgsql
There are two ways we can connect to the PostgreSQL database: Using the PHP command line interface. Using PHP API.
The supported programming languages for PostgreSQL include . Net, C, C++, Delphi, Java, JavaScript (Node. js), Perl, PHP, Python and Tcl, but PostgreSQL can support many server-side procedural languages through its available extensions.
A: PostgreSQL is released under the OSI-approved PostgreSQL Licence. There is no fee, even for use in commercial software products.
You should add pdo_pgsql extension into the CLI config of your php in
yourPhpDirectory/cli/php.ini
CLI uses this config to work in command line, not the one for apache. This is the reason why phpinfo();
shows you pdo_pgsql and php -m
not. Also under Windows OS you should restart your command line tool to see differences after any config changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With