Jump to content

Cant connect to PostgresSQL database with ssl


jb489

Recommended Posts

Hi guys,

 

I have a problem which I just cant seem to solve.  I am trying to connect to a postgreSQL database using php over ssl:

 

Now the postgreSQL database is not on the same machine.  I know that the database has ssl built in because i am using pgAdminIII and connecting with ssl option as required.  When I set this to disable, it doesnt connect at all.  So therefore must have ssl built in.

 

Now for the code.

 

I am using the pg_connect as follows:

 

pg_connect($ConnectionString);

where $ConnectionString = "host=data.gf.com user=radedd password=pa55w0rd dbname=data sslmode=require port=5432"

 

and I am getting this error:

pg_connect(): Unable to connect to PostgreSQL server: sslmode value "require" invalid when SSL support is not compiled in

 

Can someone please help me on this as I am losing my mind trying to figure it out.  I have tried googling in vain, every site says, configure your postgreSQL server, restart it(which I couldnt even if i wanted to as its a live system, and i clearly dont need to as pgadmin3 is connecting fine with ssl)

 

Please help guys...

Thanks to all..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.