Subject Re: Yum-2.6.0-1 - problem adding FB support to PHP5
Author Myles Wakeham
> We're having problems with installing the PHP/Firebird module on the
> following platform Linux version 2.6.15-1.2054_FC5smp
> (bhcompile@...) (gcc version 4.1.0 20060304
> (Red Hat 4.1.0-3)
>
> The original LAMP installation was done using Yum-2.6.0-1.
> It includes: php-5.1.2-5, mysql, Apache - httpd-2.2.0-5.1.2.
>
> Firebird SS v1.5.3.4870-0.i686 has been installed and the final task
> is to get database connectivity with the php environment. I've used
> the following command which was found in the on-line manual. However I
> found that apxs does not exist on the machine.
>
> /configure /usr/bin/apxs --with-interbase=shared,/opt/firebird

I run PHP5, Apache2 & Firebird 1.5 SS on Fedora Core 5, with no problems.
APXS should exist on a default Fedora/Apache2 box. Do a LOCATE for it.
Mine is in /usr/local/apache2/bin/apxs. As PHP5 is built to be a shareable
module for Apache, you must have the apxs supported correctly in your
configuration to get any PHP working on that box under Apache. So getting
the PHP5 compiled from source is the key here. Your configure command seems
a bit lite to me.

Firstly get the latest PHP5 build for your server. It should be 5.1.4.
Grab it from PHP.Net. Then untar it into a directory, and create yourself a
script to do the rebuilding of it. I never trust using YUM to get this
stuff, because I can never control just where things are going tobe
installed, etc. when I use a defacto RPM. I like to build this stuff from
scratch. Might take longer to begin with, but you know where things are
going to be put then. Chances are that as you start to use more and more
stuff in PHP5, you'll be rebuilding it frequently as you need to add stuff
like XML support, SOAP, SSL, etc. At least this way, all you need to do is
to edit your configuration script and re-run as necessary.

There are three steps to it:

1. Configure the build
2. Make (compile) the release
3. Make/install the release

You probably know this already.

Most importantly, in Fedora the default directories where stuff gets
installed (ie. Apache2, PHP, etc.) often isn't the same location where your
Make system will put the files from the source builds. Its important to
know exactly where your current PHP system is installed and running from,
and that you rebuild PHP and put the libphp5.so file in the same place that
the current one is located in. This has caused me hours of depression &
wonder. The LOCATE command is your friend here.

You can find out where PHP is running from by creating a small PHP file that
does a phpinfo() on your system and use the information from this to verify
what has truly been installed in your PHP configuration.

If this is of any help, this is the configure script that I use for new PHP5
builds:

./configure --prefix=/usr/local/php5
--with-apxs2=/usr/local/apache2/bin/apxs --
with-interbase=/opt/firebird --with-jpeg-dir=/home/mylesw/jpeg-6b
--with-tiff-di
r --with-gd --enable-gd --enable-gd-native-ttf --with-zlib
--with-zlib-dir=/usr/
lib --with-openssl=/home/mylesw/openssl --enable-force-cgi-redirect
--enable-mem
ory-limit --enable-exif --with-xmlrpc --with-imap-ssl --enable-soap
--with-confi
g-file-path=/usr/local/apache/php --with-curl=/home/mylesw/curl-7.15.3/lib

Adjust as you feel necessary. But things like the graphics stuff will be
valuable, as is the SOAP support, etc.

If you had a pre-existing LAMP system pre-built, my guess is that they would
have built a lot of this stuff into your configuration as well, and you'll
likely be back re-building PHP5 when you start finding commands that you
used to have and no longer do.

Hope this helps.

Regards,
Myles

===============================
Myles Wakeham
Director of Engineering
Tech Solutions US, Inc.
Phone (480) 451-7440
www.techsol.org