[dev] Compiling PHP for Apache 2

Luciano Ramalho luciano at ramalho.org
Tue Jun 27 07:15:08 PDT 2006


Chuck Hagenbuch wrote:
> Here's what I've been able to find:
I very much appreciate you looking into this, Chuck!

When I recompiled with different configure options as you suggested I 
noticed I had missed a message buried in the output of `make install`:

-----------
libtool: install: warning: remember to run `libtool --finish 
/opt/php-5.1.4/libs'
-----------

So I did:

-----------
libtool --finish /usr/lib/apache2/modules/libphp5.so
-----------

And that did the trick!!!

Then I recompiled PHP with my original configure options, and all seems 
to be fine.

Regarding the configure options, here is my rationale for the ones you 
mentioned (please correct me if I am wrong):

--with-dom: that is redundant; it's mentioned by horde/docs/INSTALL, but 
now I realize those instructions are for both PHP4 and PHP5

--with-pdo-mysql: apparently is not implied by --with-mysql; when I 
tried without it, phpinfo mentioned only sqlite2 (and not mysql) in its 
PDO drivers line

--with-readline: seems harmless so far, and I wanted it to use php-shell 
(I am addicted to this kind of interactive shell, so popular in the 
Python and Ruby communities; it's really useful for quickly testing new 
ideas and checking assumptions)

In the end, this is the configure line I used:

./configure --with-apxs2=/usr/bin/apxs2 \
--with-gettext --with-dom --with-mcrypt \
--with-iconv --enable-mbstring=all --enable-mbregex \
--with-gd --with-png-dir=/usr --with-jpeg-dir=/usr \
--with-mime-magic=/usr/share/file/magic.mime \
--with-mysql --with-pdo-mysql \
--with-zlib-dir=/usr --with-readline

So after just 36 hours ;), I've got a spanking-new, homebrew PHP 5.1.4 
Apache2 module running with all that I need (I think).

Cheers,

Luciano


-- 
THE ROAD TO WISDOM?
Well, it's plain
and simple to express.
Err and err and err again,
but less and less and less.
— Piet Hein.



More information about the dev mailing list