i have apache1.3, php4 and postgresql 8.0 on a development machine, running ubuntu breezy

i can't get past this message:
"PHP PostgreSQL support not enabled"

i have installed php4-pgsql from apt-get
i've restarted apache.

calls to pg_connect result in:
Fatal error: Call to undefined function: pg_connect() in /var/www/includes/database.pgsql.inc on line 24

so, what do i need to add to provide pg_connect in php4 on breezy?

Comments

styro’s picture

Is that your php4-pgsql package might be an Apache 2 one? But apt-get should've taken care of that. I can't really see how what you've already done wouldn't work - it looked fine to me.

Maybe ask on the Ubuntu forums - they are usually very helpful.

--
Anton
New to Drupal? | Forum posting tips | Troubleshooting FAQ
Example Knowledge Base built using Drupal

Shiny’s picture

not so helpful on ubuntu forums - the only suggestion i got was that postgresql wasn't started...

i spent 2 days apt-get ing trying to find the combo to make pg_connect() available - no luck.

ghostbar’s picture

that's the package that you need ;)

Shiny’s picture

thanks, but as i said above, i have installed php4-pgsql from apt-get

-------------------------------------------------------
http://coffee.geek.nz

ghostbar’s picture

Check that file to be sure that you can connect from 127.0.0.1 from that user without ident sameuser, should be trust or crypt

Me hapens once that and says me the same error...

That file's in /etc/postgresql/data/pg_hba.conf

Hope works...

Shiny’s picture

Yes, i can connect psql -U phpdbusername dbname
my pg_hba is set to trust. postgresql is listening on 5432 (i even telneted to confirm it's open)

in php it's not even attempting to connect.. it's saying it can't find the pg_connect() and not getting any further.

it's not just drupal.. any simple php script/page will say it can't find pg_connect()

i've been apt-get ing like mad.. trying php4, php5, apache, apache2, postgres 7.4, postgres 8... combinations there of.

i'm thinking there must be some config somewhere that tells php, or apache, which modules to load... and it's not loading the php(4|5)-pgsql for some strange reason.

-------------------------------------------------------
http://coffee.geek.nz

ghostbar’s picture

I thinks there's some module for apache for authentication with pgsql...

try

aptitude search libapache-mod-auth && aptitude search libapache-auth

maybe there could be your solution...