Re: Need help building PHP3 with MySQL as DSO on Solaris 8, PHP4 + MySQL built and loads fine

From: Gary L. Burnore (
Date: 06/25/04

Date: Fri, 25 Jun 2004 12:27:59 -0400

On Fri, 25 Jun 2004 11:28:21 -0400, wrote:

>Greetings, I need help configuring/building PHP3 with MySQL as a DSO
>on a Solaris 8 box - this module is needed to host some existing
>sites I will be migrating
>Note. I built PHP4 from source and it loads without an error.
Solaris 8 for Intel or Sparc?

>When I try t run "apachectl configtest" I get the following error:
>Cannot load /usr/local/apache/libexec/ into server:
>fatal: relocation error: file /usr/local/apache/libexec/
>symbol mysql_create_db: referenced symbol not found
>I would like to know how to fix this, below are some of the many
>different approaches I have tried
>I am trying to build php-3.0.18 with Apache 1.3.31

Why not Apache2? Just curious.

>I am using gcc 3.3.2
>My configure string looks like the following
>./configure --with-mysql=/usr/local/mysql
>--with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-versioning
>I have tried modifying my LD_LIBRARY_PATH to include
>/usr/local/mysql/lib and alternatively /usr/local/mysql/lib/mysql
>I have tried configuring my run time linking environment with crle as
>Default Library Path (ELF):
> and alternatively
>I also tried adding the following statements to the Makefile in the
>APXS_LDFLAGS and LIBS definitions: "-lmysqlclient" as follows

The order you do this stuff is important:

build a base of apache and install it
build mysql and install it
build php with your config settings and install
rebuild apache telling it where mysql and php are.

Depending on if it's Solaris for Intel or Sparc, you can find some
pre-compiled stuff at

gburnore@databasix dot com          
                  How you look depends on where you go.
Gary L. Burnore                       |  ۳ݳ޳ݳۺݳ޳ݳݳ޳ݳ۳
                                      |  ۳ݳ޳ݳۺݳ޳ݳݳ޳ݳ۳
DataBasix                             |  ۳ݳ޳ݳۺݳ޳ݳݳ޳ݳ۳
                                      |  ۳ 3 4 1 4 2  ݳ޳ 6 9 0 6 9 ۳
Black Helicopter Repair Svcs Division |     Official Proof of Purchase
      Want one?  GET one!