cakephp 3 postgres 9.4 driver bake - postgresql

I want to generate models with bake terminal command. CakePhp 3 is able to connect to my postgres database. All PHP extensions for postgres are activated (php_pdo_pgsql, php_pgsql). I checked php.ini.
When I run the command: cake bake model
I have this error:
Exception: Database driver Cake\Database\Driver\Postgres cannot be used due to a missing PHP extension or unmet dependency in [C:\wampPI\www\ticketHellocom\vend
or\cakephp\cakephp\src\Database\Connection.php, line 171]

You need to install the pdo_pgsql module for your php installation and activate the extension in your php.ini.

Related

install php driver of mongo db on mac with m1 chip

I'm trying to install mongodb php driver on mac with m1 chip using pecl.
php 7.4
XAMPP
when I run command:
sudo pecl install mongodb
it start downloading, phpize, configure and after all make of downloaded package, but during the make process it throw this error in spite of that file exist.
result was same when I tried the steps manually too.
1 error generated.
make: *** [src/libmongoc/src/libmongoc/src/mongoc/mongoc-scram.lo] Error 1
ERROR: `make' failed
so I need to know if some one faced same issue and could solve it or not. I'll attach a shot of error
if you need any other deta
best regards

ERROR: incompatible library while creating extension in Postgresql

I use Centos 7 and Postgresql 12. I installed already PostGIS and created successfully its extension. I'm now tring to install semver extension with create extension semver and get following error:
ERROR: incompatible library »/usr/pgsql-12/lib/semver.so«: version
does not match
According to developer this version should work with my Postgresql 12. Why am i getting this error?
Thanks!
An extension's .so binaries are specific to a major release of Postgres.
If you're installing the extension through yum, there would typically be a different package for each Postgres version. For example, if you installed Postgres 12 using the postgresql12-server package, then you would install PostGIS 3.0 using the postgis30_12 package.
If the package name is just pg-semver, without a Postgres version number, then it's probably intended for your distribution's default postgresql-server package. In CentOS 7, this appears to be Postgres 9.2, so these files won't work on a Postgres 12 server.
If you can't find a PG12-specific package, you'll need to build it yourself, using the instructions here.

Error setting up OSSEC HIDS with PostgreSQL on Debian 8

I am trying to install OSSEC HIDS on my server with a Database Suport (have done it before with mail notifications). I already have PostgreSQL with other databases in it, but when I try to compile OSSEC with Database Suport (Like in this guide: http://ossec-docs.readthedocs.io/en/latest/manual/output/database-output.html ), I get the following error ( when running the command # make setdb ):
Error: MySQL client libraries not installed.
Error: DB libraries not installed.
Tried to just ignore it and install it using the instal.sh script, and it works fine, but when I add the Database options to the config file, I get:
Starting OSSEC HIDS v2.8.3 (by Trend Micro Inc.)...
2016/06/06 18:34:58 ossec-dbd(5207): ERROR: OSSEC not compiled with support for 'postgresql'.
2016/06/06 18:34:58 ossec-dbd(1202): ERROR: Configuration error at '/var/ossec/etc/ossec.conf'. Exiting.
You must have libpq-dev installed. Use this:
sudo apt-get -y install libpq-dev
Moreover to be at safe side, install these packages as well:
sudo apt-get install postgresql-client postgresql-client-common
Let me know, if you're still facing any issues. It works just fine for me.

Postgres create POSTGIS extension error with CentOS 6

I am running PostgreSQL 9.3 with Postgis 2.0 on CentOS 6.3.
I installed PostgreSQL and PostGIS according to this instructions:
http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21CentOS6pgdg
When trying to create Postgis extension
Create Extension Postgis;
I get the following error,
ERROR: could not load library "/usr/pgsql-9.3/lib/rtpostgis-2.1.so": libhdf5.so.6: cannot open shared object file: No such file or directory
May I know how to install the POSTGIS extension successfully?
I have CentOs 6.5 and did this:
1) Install following packages
hdf5-1.8.11-42.1.x86_64.rpm
json-c-0.10-2.1.x86_64.rpm
libhdf5-8-1.8.11-42.1.x86_64.rpm
libhdf5_hl8-1.8.11-42.1.x86_64.rpm
I don't know if I can link files directly here, so look for those files at rpm.pbone.net, download CentOS 6 version.
2) As Postgis requires version hdf5 version 6, you have to execute this commands as root (# is prompt)
# cd /usr/lib64
# ln -s libhdf5_hl.so.8 libhdf5_hl.so.6
# ln -s libhdf5.so.8 libhdf5.so.6
PS Don't forget to install postgresql contrib package, as Postgis requires fuzzystrmatch extension for some modules.
Have you tried installing the package that contains libhdf5 and then tried running again the create extension command? Apparently postgis is linked to that package which is not present on your system.

PDO Exception Symfony 2

Trying to run php app\console doctrine:schema:update --force. I Catch this error:
In parameters.ini I use database_driver = pdo_pgsql
What about my phpinfo? It seems everything is alright!
Can you give me advice what to do?
The reason might be that CLI and Apache versions of PHP have different configuration and pdo_pgsql is not activated for the CLI version.