Re: Freebsd/Postgres/Apache+PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/31/2011 12:18 PM, babak badaei wrote:
Hello Postgres Community,

Thank you guys very much for PostgreSQL. To me, its the best database management system under the sun. I am setting up a new jail configuration on FreeBSD with sockets and everything enabled. I can ping localhost fine. The problem is that when I load a script that connects to the database, Postgres says Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "x.x.x.x" (my actual web IP). I have done the following on the host machine:
I'd like Apache/PHP to just connect to Postgres localhost, not via the jail's IP--thus, no change to pg_hba.conf is needed.
If you guys have any suggestions it would be very much appreciated!

I have no experience actually using a modern FreeBSD jail, but I do have some questions?

1. Are PHP and PostgreSQL running in different jails?

2. What are the addresses PostgreSQL is set to listen on?

3. What PHP statement are you using to establish the connection?

4. If PHP and PostgreSQL are on different jails,


1. Be sure you are connecting with localhost, not local unix domain sockets (it appears you are based on the error message).

2. Is PHP running on a different jail than PHP? If my reading is correct, a FreeBSD jail is basically a virtual host and has its own IP addresses and I doubt that the loopback localnet is shared among those hosts.

3. What is the IP address of the server and of the client and what PHP connection statement are you using?

Cheers,
Steve


--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux