Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Connection to db vi...
 
Notifications
Clear all

Connection to db via Unix Socket?

4 Posts
2 Users
0 Reactions
3,303 Views
(@verncon)
Posts: 41
Active Member
Topic starter
 
[#2432]

Hi,

Is it possible to connect via unix socket to PGSQL, from Projeqtor?

Cheers,
Verncon.


 
Posted : 12 Jul 2015 2H11
(@verncon)
Posts: 41
Active Member
Topic starter
 

Got it sorted, all is OK.


 
Posted : 12 Jul 2015 15H22
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Hi, VERNCon

If you found a trick, please share with the community, it could help someone.
Thanks in advance.


 
Posted : 12 Jul 2015 16H35
(@verncon)
Posts: 41
Active Member
Topic starter
 

Hi,
It was much simpler than I expected....
In the parameters.php file, at $paramDbHost value, all I needed to do was enter the Unix Sockets directory for the connection.
In my case (Fedora with PGSQL), I entered "/var/run/postgresql/" and re-started the httpd Service.

You need to have the database listening on the appropriate Unix Sockets - the default for PGSQL is /var/run/postgresql/ and /tmp.

The code used in this software is obviously much "nicer" than others, as I did the "usual" and I replaced the / 's with %2f, but then it complained that it could not parse the value.
I tried the straight text string including the forward-slash, it happily accepted it and the database connection came straight up. You still need to correctly edit the pg_hba.conf file correctly to control the access.

Cheers,
Verncon.


 
Posted : 12 Jul 2015 20H49
Share:

Scroll to Top