Mike,
This can be a bit frustrating, but all in all it's not too bad. I usually
make up my own configuration file just to avoid re-typing everything,
because I generally don't get it right the first time. I then chmod +x them
so that they will execute. They're quite simple, just scripts that call
configure with all the various parameters.
I arrived at the choices below after reading the LAMP documents, the
"Soothingly Seamless Installation of Linux, Apache, MySQL and PHP" and the
various configuration options for each of MySQL, PHP, PostgreSQL and Apache.
Before building from source I tried working with RPMs on my older Red Hat
systems, and with dselect on two Debian boxes. These are all well-debugged
software packages, and aside from taking some time to compile on the oldest
box, a P 133, everything went smoothly.
Here's the one for PostgreSQL, locating PostgreSQL in a very non-standard
location. Can't remember why I wanted w-odbc.
-------start of script ----------
#!/bin/sh
./configure \
--with-prefix=/drv2/bin/pgsql \
--with-odbc
---------- end of script --------
For Apache I wanted a whole bunch of stuff, thus "enable-shared=max". If I
remember correctly that let me load all the modules dynamically.
-------start of script ----------
#!/bin/sh
./configure \
--with-layout=Apache\
--prefix=/usr/local/apache \
--enable-shared=max
---------end of script -----------
And finally PHP. "with apxs" allows Apache to load PHP dynamically, and the
parameter has to be specific. "with-mysql" points to my non-standard
location of mysql, similarly I told it explicity where PostgreSQL was
installed.
------- start of script --------
#! /bin/sh
./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/drv2/bin/mysql \
--with-pgsql=/usr/local/pgsql \
--enable-track-vars
------------- end of script --------
Pay attention to the line in the PHP INSTALL doc refers to relocating
php-ini-dist (think that's the name) and to the changes you have to make to
Apache's httpd.conf file.
When all configuring, making and installing is done, you may get an error
from Apache that it can't find the .so modules for PostgreSQL (and in my
case, MySQL). If so, locate the modules and edit /etc/ld.so.conf, adding
the paths to these modules. On my system I added these two lines,
/usr/local/pgsql
/drv2/bin/mysql/lib/mysql
Save the file and run ldconfig. Apache should then run OK.
As to your question "Why doesn't PHP have support for PostgreSQL built in
..", have a look at all the different databases PHP supports and consider
how immense the program would be if everything was compiled in by default.
Hope this is helpful. If you have more problems, there is a php-install
list which deals with specific installation problems.
Regards - Miles Thompson
PS These 4 programs were my first experience building on Linux systems, and
initially it was a bit daunting. I hope you find this helpful. /mt
At 12:15 PM 1/26/2002 -0500, you wrote:
>Hello,
>
>I am rather new to Linux but an old timer at software development. I am
>investigating alternate platforms for future development for my company.
>Linux is at the top of the list.
>
>I am trying to get a server setup with a db (PostgreSQL), web server
>(Apache), and some sort of web scripting language (PHP). I can not make
>everything work together. PHP4 won't work out-of-the-box with PostgreSQL
>because PHP doesn't have support for PosgreSQL built in at compile time (why
>not just build everything into when it was initially built?).
>
>So I get the sources to PHP and try to build. However, it wants the sources
>(header files) for Apache.
>
>At this point I don't want to go any further. Eventually, I'll probably
>need the sources for everything.
>
>Is there an easy way to do this sort of stuff on Linux or is it better to
>just buy off the shelf products that work?
>
>Thanks,
>Mike
>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]