How do I add things to my PHP install? IE: PostgreSQL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
superwormy
Forum Commoner
Posts: 67
Joined: Fri Oct 04, 2002 9:25 am
Location: CT

How do I add things to my PHP install? IE: PostgreSQL

Post by superwormy »

I've already installed PHP, how do I add things to my PHP install? I want to add PostgreSQL and the Calendar functions.

Running FreeBSD 4.6.2 and installed PHP / MySQL / PosgreSQL / Apache all through the FreeBSD Ports collection...


Anyone knwo?
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Post by BDKR »

I'm a Linux dope that isn't really familiar with FreeBSD yet. I'm planning on changing that. But in the short term, what is the "Ports Collection"?

Cheers,
BDKR
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

afaik it does not include binaries but the information how to fetch the sources and how to build them. I'm not familiar with bsd but gentoo uses almost the same aproach.
Here's a small snippet from the php.4.2.3-portage file of my gentoo-box
...
DESCRIPTION="Apache module for PHP"
SRC_URI="http://us3.php.net/distributions/${MY_P}.tar.bz2"
...
src_compile() {
...
use pam && myconf="${myconf} --with-pam"
use nls && myconf="${myconf} --with-gettext" || myconf="${myconf} --without-gettext"
use ssl && myconf="${myconf} --with-openssl"
use curl && myconf="${myconf} --with-curl"
use snmp && myconf="${myconf} --with-snmp --enable-ucd-snmp-hack"
use cjk && myconf="${myconf} --enable-mbstring"
...
./configure ....
make || die "compile problem"
...
src_install() {
make INSTALL_ROOT=${D} install-pear || die
...
so I configure what I want/need by setting the enviroment variable USE and start the portage system for updating mod_php.
It fetches the sources, calls configure with the appropriate settings, compiles&installs mod_php and add the new version to an internal database to keep track of the system components (dependencies etc.).
Probably the Ports Collection uses a similar system ;)
Post Reply