Re: PHP building on Linux: A question on configure script!

From: Date: Mon, 06 Jan 2003 16:53:21 +0000
Subject: Re: PHP building on Linux: A question on configure script!
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-93188@lists.php.net to get a copy of this message
Oops.. I forgot the files... Here they are! Le lun 06/01/2003 à 12:49, Jean-Michel Dault a écrit : > Le lun 06/01/2003 à 07:24, Ananth Kesari a écrit : > > What we are looking for is to find out whether or not the current > > autotool input files of PHP support the ability to produce a spearate > > phplib.l and the appropriate "main" module - one for Apache 1.3, one for > > Apache 2.0, one for command line etc. each of which can use the same > > phplib.l ? > > > > We tried to figure this out on Linux, but it appears that this seems > > not to be supported. Are we correct in our findings? Or is there really > > a way of doing the above of having different shared modules? > > It is not supported officially, but there's a way to do it. > > As I promised a couple of days ago, here is a solution that works for > me, though it's not very pretty. I could of course modify the m4 files, > but it's left as an exercise to the readers of this list ;-) > > Here is the procedure: > 1) Patch the makefile.global and configure script using the > "shared-patch" I enclosed in this mail. This will compile a shared > library containing the PHP core, and will patch the CGI and CLI version > so they use this library. > > 2) do ./configure, with all the options that you want, but do *not* use > the --with-apache or --with-apxs options. You want to compile first the > CGI and CLI binaries and the shared library. > > 3) do a make, but do not do a make install yet. > > 4) To compile the Apache 1.3 module, use the enclosed "do1.3" script. > If your Apache environment is setup correctly, you will have a > libphp4.so in the sapi/apache directory. This is the Apache DSO that > you'll need to copy in your Apache 1.3 modules directory. > > 5) To compile the Apache 2.0 module, use the enclosed "do2.0" script. > If your Apache environment is setup correctly, you will have a > mod_php4.so in the sapi/apache2filter/.libs directory. This is the > Apache 2.0 DSO that you'll need to copy in your Apache 2.0 modules > directory. > > Please note that to be able to compile both Apache 1.3 and Apache 2.0 > modules, you need two different apxs binaries and two different > apache include directories. I personnaly use the following dirs: > Apache 1.3: /usr/sbin/apxs and /usr/include/apache for 1.3 > Apache 2.0: /usr/sbin/apxs2 and /usr/include/apache2 > > 6) Finally, place the libphp_common library in /usr/lib > mv libphp_common.so libphp_common.so.430 > ln -s libphp_common.so.430 libphp_common > cp libphp_common* /usr/lib > > 7) Now do a "make install", "make install-cli" > > 8) Finally, you can install sapi/cgi/php to whatever location/name you > want that is different from the CLI version. > > 9) You'll still need to tweak your httpd.conf to put the required > LoadModule, AddModule and AddType directives. > > 10) Or better yet, install Mandrake Linux and have it already > pre-configured ;-) > > > Regards, > > Jean-Michel Dault > Apache/PHP Packager > Mandrake Linux >

Attachment: [text/x-patch] shared-patch
Attachment: [text/x-sh] do1.3
Attachment: [text/x-sh] do2.0
« previous php.dev (#93188) next »