This topic is locked
[SOLVED]

 Connection to PostgreSQL

6/16/2016 11:48:11 PM
PHPRunner General questions
K
KelvinChua author

Hi All,
I inserted the following into the embeds after AppInit
///CODE ///

define('ENVIRONMENT', 'PRODUCTION');
if(constant('ENVIRONMENT') == 'DEVELOPMENT')

{

$host="192.168.1.5";

$user="admin";

$pwd="12345678";

$port="5432";

$dbname="candidportal";

}

else

{

$host="10.0.0.29";

$user="admin";

$pwd="87654321";

$port="5432";

$dbname="candidportal";

}

///CODE ///
I copied all the codes within my output folder after full build to my customer's server.
But, it simply don't read the 10.0.0.29 database.
Have I missed anything important or is the code erroneous?
Thanks.
Kelvin Chua

SINGAPORE

W
wpl 6/17/2016

Kelvin,
does the PostgreSQL installation on 10.x.x.x allow non-local connections in hba_conf?
Just my 2 cts

K
KelvinChua author 6/17/2016



Kelvin,
does the PostgreSQL installation on 10.x.x.x allow non-local connections in hba_conf?
Just my 2 cts


Hi,
Yes, I had defined the CIDR for 10.0.0.0 till 10.0.0.254. I had also accessed that PostgreSQL server with my PostgreSQL Manager without any issues.
Thanks.
Kelvin Chua

SINGAPORE

Sergey Kornilov admin 6/17/2016

Proceed to 'Output screen', create a new 'Server database connection', see correct variable names and place your code right there.

K
KelvinChua author 6/17/2016

Hi Sergey Kornilov,
You are great!!
Resolved perfectly!
Thanks.
Kelvin Chua

SINGAPORE