Gossamer Forum
Home : General : Internet Technologies :

reconfiguring/recompiling php

Quote Reply
reconfiguring/recompiling php
Anyone have any experience installing and configuring php?

I need to tweak my configuration slightly by adding support for a couple of new libraries. The library files have all been installed, and I now need to recompile php.

Taking a look at the documentation for this - http://www.php.net/...tall.apache.php - it appears that since php is already installed, all I need to do is repeat steps 10, 11, and 12 - basically just run the new configuration command followed by "make" and "make install".

The problem I'm having is that I can't figure out which directory I need to be in to do that. All of the instructions I've found are based on the assumption that I've been installing php from scratch and that I will have extracted all the files into a source directory somewhere. But I can't find any directory that will allow me to run the configure command. Does that mean I need to install the source files again and start from scratch? I'm running php as an apache module under debian linux.

Thank you very much for any ideas or suggestions.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] reconfiguring/recompiling php In reply to
Hi,

If PHP is compiled as a module and not statically, then all you need to do is download php, untar it, and run something like:

./configure \
--with-apxs=/path/to/your/apache/bin/apxs \
--with-mysql \
... your other options
make
make install

Do a './configure --help' for a full list of possible options.

The 'apxs' program comes with apache and is used for building and installing apache modules.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] reconfiguring/recompiling php In reply to
Thanks for the reply, Alex. Which directory should I be doing this in?

If it makes a difference, "whereis php" currently outputs: /etc/php /usr/local/bin/php /usr/local/lib/php

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] reconfiguring/recompiling php In reply to
Quote:
Which directory should I be doing this in?

Which ever directory the "configure" script is in....

That location will be wherever you untar'd php originally.

Last edited by:

Paul: Apr 25, 2003, 9:08 AM
Quote Reply
Re: [Paul] reconfiguring/recompiling php In reply to
Thanks. So I take it it all ends up in the right place regardless of where I get started with the untarring?

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] reconfiguring/recompiling php In reply to
Yes, "make install" will put everything in the right place, unless you used any special switches when compiling first time which installed into non-standard directories.
Quote Reply
Re: [Paul] reconfiguring/recompiling php In reply to
Cool - thanks for your help.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund