Re: CYGWIN+Apache+PHP+PostgreSQL

From: s0lao(at)netscape(dot)net (S(dot) L(dot))
To: fran(at)ninecom(dot)com ("Fran Hsieh")
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: CYGWIN+Apache+PHP+PostgreSQL
Date: 2002-05-09 09:42:20
Message-ID: 6C40F9D4.0D56412E.00013D13@netscape.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

"Fran Hsieh" <fran(at)ninecom(dot)com> wrote:

>Hi,
>
>Can you share this solution, or teach me?
>Thx.

Actually, there's nothing to "share" (all the software is opensource an largely available on the Interne :). You can use the prebuilt versions for Apache and PostgreSQL. I don't know If apache maintainer provides a php module, and if it does, whether it has pgsql support. You can compile php as a dll module for Apache, using autoconf steps. Here's the line I use for configure script:

./configure --with-apxs=/usr/local/apache/bin/apxs --without-mysql --disable-xml --with-pgsql --with-dbase

[Note: I used this for php 4.1.0]

You must substitute "timezone" with "_timezone" in the file "ext/standard/datetime.c", and the compilation process will have no problems. The linking step consists in a line like:

apxs -c -o libphp4.dll libphp4.a /usr/local/apache/lib/libhttpd.dll

in the .libs directory from the php source tree.

Hints:
- you must know very well where your dlls and other libraries are (as the "/usr/local" above suggests, in my case they are self build -- so "./configure" finds the postgresql support in a "well known" place); I'm not aware of the installation layouts the prebuilt packages might have.
- the "make install" script doesn't copy the libphp4.dll in the apache's "$libexec" path, neither adds the LoadModule/AddModule lines; these must be done manually.
- the first hint applies to starting apache with php enabled, i.e. the libphp4.dll depends on postgres' libpq.dll; their paths must be included in the $PATH variable before you do "apachectl start".

[...]

>>Anyone had any success building this combination?
>>
>[...]
>Yes.
>

[...]

Please keep replies on the list, so others can benefit/contribute.

SLao

__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop(at)Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

Browse pgsql-cygwin by date

  From Date Subject
Next Message Henshall, Stuart - WCP 2002-05-09 09:46:03 PG+Cygwin Production Experience (was RE: Path to PostgreSQL porta biliy)
Previous Message Henshall, Stuart - WCP 2002-05-08 13:51:23 Re: cygwin server w/ data on *nix machine?