Page 1 of 1

postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Wed Feb 13, 2019 12:58 pm
by hekmati
i have PM 3.3.2 and postgresql 10 on my ubuntu 18.04 with php 7.2 by default.
according PM instruction i installed php5.6-pgsql with :
sudo apt-get install php5.6-pgsql
and restart appachi. but i have not postgresql connection in my connection list.
i have pdo_pgsql and pgsql in result of command : php -m

whats is wrong?
thanks for attention and reply.

Re: postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Wed Feb 13, 2019 3:49 pm
by ziadeh
I think you have to install postgresql based on your default/activated php version.
Code: Select all
sudo apt-get install php7.2-pgsql

Re: postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Wed Feb 13, 2019 4:53 pm
by hekmati
hi ziadeh
i do that but does not work too.
when i install php7.2-pgsql it is not shown in php -m command result but when i install php5.6-pgsql i see it in php -m command result. but in both solution PM does not bring the postgrsql connection option.
does anyone face this problem in ubuntu 18.04?

Re: postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Wed Feb 13, 2019 7:41 pm
by amosbatto
PHP 7.2 is not supported by ProcessMaker. Follow these instructions to install PHP 7.1 in your server.

Then, check which is your default version of PHP:
php -v

If the default version is PHP 7.2, then you need to do this to create a symbolic link to PHP 7.1
sudo unlink /usr/bin/php
sudo ln -s /usr/bin/php7.1 /usr/bin/php
php -v

Then, edit your php.ini file:
sudo nano /etc/php/7.1/apache2/php.ini
Change the line:
;extension=php_pgsql.dll
To:
extension=php_pgsql.dll
After saving and exiting nano. Then restart Apache:
sudo systemctl restart apache2
sudo systemctl status apache2

Then the option PostgreSQL should appear in the list of available database when you create a new Database Connection.
I got that to work in Ubuntu 18.04 with ProcessMaker 3.3.0, MySQL 5.7 and PHP 7.1

Re: postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Thu Feb 14, 2019 3:07 am
by hekmati
Hi amosbatto
Now i changed my php to 7.1 with your instruction. and now my defalut php is 7.1.25
i have installed PM with bitnami and my php.ini is in /opt/processmaker/php directory.
i uncomment php_pgsql.dll extension but i think this row is for windows not linux is it right?
then i restarted apache
but the problem still remain and i dont have pgsql in my connection list.
thanks again.

Re: postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Thu Feb 14, 2019 10:00 pm
by amosbatto
Oh you are right.
I was working on both a Windows system and a Ubuntu system in virtual machines and I mixed up the two when I wrote up that post.

I installed it in Ubuntu 18.04 with this command:
sudo apt install php7.1-pgsql

But I was using a manual install, and you are using a Bitnami install. Restart Bitnami's Apache:
cd /opt/processmaker-3.X.X.b1-0
sudo ./ctlscript.sh restart apache


Then, login to Processmaker as the "admin" user and go to Admin > PHP Information and check whether you are using PHP 7.1.26-1+ubuntu18.04.1+deb.sury.org+1.

If not, then you are still using Bitnami's PHP. The easiest solution is to do this:
mv /opt/processmaker-3.X.X.b1-0/php/bin/php /opt/processmaker-3.X.X.b1-0/php/bin/php-original
ln -s /usr/bin/php7.1 /opt/processmaker-3.X.X.b1-0/php/bin/php


Then restart Bitnami's Apache again and now ProcessMaker should be using PHP 7.1.26-1+ubuntu18.04.1+deb.sury.org+1 with the php7.1-pgsql module and PostgreSQL should available when creating a Database Connection.

Re: postgresql connection does not apear in database connections list in ubuntu 18.04

Posted: Fri Feb 15, 2019 4:19 pm
by hekmati
i did your instruction. but the problem still remain.
i think problem is lied under bitnami installation. according bitnami docs in :https://docs.bitnami.com/general/apps/r ... dules-php/
i walked the way of installing pdo-pgsql in bitnami with above instaruction. but because of some version conflict the last command of instruction has error.
Finllaly i think i must install PM manually not with pretty! bitnami or i gave up using postgres in PM :D