Re: Installation of Postgres + PHP

From: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
To: "James Snelling" <fatboy2000(at)btinternet(dot)com>, "Pgsql" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Installation of Postgres + PHP
Date: 2000-11-06 06:58:55
Message-ID: 00110601585500.30061@comptechnews
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Monday 30 October 2000 08:09, James Snelling wrote:
> Hi, I followed the instructions at
> http://users1.50megs.com/tomcat/postgresql-tutorial/
> which describe in very simple terms how to install Postgres and Apache with
> PHP support.
>
> It didn't work! The main thing is that PHP didn't have the postgres support
> listed in the additional support info.
>
> Does anyone know of similar step by step tutorials for the computer
> challenged like myself?
> Thanks!

1. Install Apache as normal.
2. Install PostgreSQL as normal.
3. Compile and install PHP as an Apache Extension DSO:
(the following is some notes I made when I was installing it)

APXS (preferred way) - Apache Extension.
Note: If you use this option, you cannot build the httpd itself
as a DSO. I tried it and it would not start when this was
loaded with it. If httpd is compiled normally, this works fine
and is preferrable since it eliminates the need to have to
recompile apache too just to change database version or
add some package to php.

If building as an apache DSO, run ./configure with:
Note: This assumes that apache is already installed
(probably with only mod_ssl and mod_rewrite already
in there)
--with-apxs # Apache eXension utility enables modules
# to be compiled independent of the Apache
# source. It should have been installed
# in the ../apache/bin directory and should be
# in the PATH, else you must use
# --with-apxs=/usr/local/apache/bin/apxs
--with-pgsql
--without-mysql #otherwise it gets included by default
--with-xml
--enable-track-vars

Note: postgresql (and/or mysql) must be installed
first.
make
make install

After making it as a DSO, you must edit the apache httpd.conf
and check for/add:

LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Edit /usr/local/lib/php.ini:
Set the path to sendmail.

--
-------- Robert B. Easter reaster(at)comptechnews(dot)com ---------
- CompTechNews Message Board http://www.comptechnews.com/ -
- CompTechServ Tech Services http://www.comptechserv.com/ -
---------- http://www.comptechnews.com/~reaster/ ------------

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ian Kulmatycki 2000-11-06 09:02:59 Function Arguements
Previous Message Neil Conway 2000-11-05 19:29:58 Re: using CPAN mode, can't install DBD::Pg