Mike,
I will probably not be much more help to you, and I appreciate the time sink aspect. I've interspersed comments/questions below. PostgreSQL runs ok, does Apache run? On Sunday 27 January 2002 10:39 am, Mike DiChiappari wrote: > Miles, > > Thanks for the instructions. I am hesitant to try doing anything > that involves building, because I don't want it to become a time > sink. However, I'll give it a little more time. > > I've used the combination of your instructions along with those from > RedHat. I am using a vanilla RedHat 7.2 installation and have their > sources. I assume things would go easier if I use the RedHat sources. > > I've already encountered a problem. I've installed the RPMs with > source code for PHP4 and Apache, following RedHat's instructions. > When I run configure for PHP, I get the following error in the > debug.log file: > > CONFIGURE: './configure' '--with-apache=../apache_1.3.20' > '--with-pgsql=/usr/lib' '--prefix=/usr/' Check PHP's INSTALL doc, does it want the path to where Apache is installed, or to Apache's source? Similarly for with-pgsl, path to the executable, or to the directory where the executable is placed, or to source? > CC: gcc > CFLAGS: -g -O2 > CPPFLAGS: -DSUPPORT_UTF8 > CXX: > CXXFLAGS: > INCLUDES: -I/usr/src/redhat/SOURCES/apache_1.3.20/src/include > -I/usr/src/redhat/SOURCES/apache_1.3.20/src/os/unix > -I$(top_builddir)/Zend > LDFLAGS: -Wl,-rpath,/lib -L/lib > LIBS: -lpq -lcrypt -lresolv -lm -ldl -lnsl -lresolv > DLIBS: > SAPI: apache > PHP_RPATHS: /lib > uname -a: Linux farout 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 > unknown > > gcc -o conftest -g -O2 -DSUPPORT_UTF8 -Wl,-rpath,/lib -L/lib > conftest.c -lpq -lcrypt -lresolv -lm -ldl -lnsl -lresolv 1>&5 > /usr/bin/ld: cannot find -lpq > collect2: ld returned 1 exit status I'm sorry I don't know what the -lpq parameter means. > I assume this means there is a library missing. It has a name like > "libpq.o" or something. If I do a find on my entire system I get: > > ./usr/lib/libpq++.so.3 > ./usr/lib/libpq++.so.3.1 > ./usr/lib/libpq.so.2 > ./usr/lib/libpq.so.2.0 > ./usr/lib/libpq.so.2.1 > > I am not sure what the numbers at the end of each name are. But > since PostgreSQL runs, I assume one or more of these is the correct > one. If you cd to usr/lib, and issue ls -l libpq* you will probably find that most of these are symlinks to one or two of the files. The build you are attempting is a static build, which is why it is looking for a .o, rather than a .so file. Where does one tell PHP's config to find that object file? Was a static object file created for PostgreSQL? Do you have Perl on the system, and have you considered building "with-apxs", which allows dynamic shared objects, the .so files you already have. I'm stuck, and I've echoed this to php-install where you'll get much bettter support. Sorry I can't be more help - Miles > Mike > > >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 -- PHP Install 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]