Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 May 1999 15:58:58 -0400
From:      jfreeze@lexmark.com
To:        freebsd-questions@freebsd.org
Subject:   How to install Apache+Php3+PostreSQL?
Message-ID:  <199905271959.AA18949@interlock2.lexmark.com>

next in thread | raw e-mail | index | archive | help
With much support from the group I have been able to install postgresql.
apache-php3-1.3.4 was installed with FreeBSD 3.1 from the wccdrom 4 cd set.
I have also been able to access my postgres databases via pgaccess.

Now that I have most of the pieces installed, I have tried to connect to my pg
database using php from within a web page.

Within my simple page I have the following script.

<?php
     echo "In Php<br>";
     $db = pg_connect("","","","mydb");
     $dbName = pg_dbname($db);
     echo $dbName , "\n";
?>

Accessing this page in my browser gives

============
In Php

Fatal error: Call to unsupported or undefined function pg_connect() in
/usr/local/www/data/php1.php3 on line 9.
============

This appears to me that the php module does not have pg db connection compiled
in.
My guess is that the php module needs to be compiled with a pg_ functions
library  or
that there is a seperate module to allow php to access pg databases.
Can someone explain the fundamentals here to me. I would really like to
understand
what is going on.

To upgrade this, I have collected the following files.

apache-php3-1.3.4.tgz   (wccdrom)
apache-1.3.6.tar.gz
php-3.0.7.tar.gz

It doesn't matter to me if I install apache 1.3.6 or 1.3.4. However, I would
like php and pgsql to be
installed as a module.

I have spent several hours reading docs, but installing apache+php+pgsql is
proving to be elusive.

Thanks for any help.

Jim Freeze
jim@freeze.org




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905271959.AA18949>