CVS update: php3

From: Date: Tue, 09 Feb 1999 06:53:56 +0000
Subject: CVS update: php3
Groups: php.dev 
Request: Send a blank email to php-dev+get-3994@lists.php.net to get a copy of this message
Date: Tuesday February 9, 1999 @ 1:53 Author: rasmus Update of /repository/php3 In directory asf:/home/rasmus/php3 Modified Files: INSTALL.DSO Makefile.in configure.in libphp3.module.in Log Message: Clean up non-APXS shared library build Index: php3/INSTALL.DSO diff -c php3/INSTALL.DSO:1.3 php3/INSTALL.DSO:1.4 *** php3/INSTALL.DSO:1.3 Sun Feb 7 11:37:26 1999 --- php3/INSTALL.DSO Tue Feb 9 01:53:55 1999 *************** *** 1,20 **** Compiling PHP as an Apache Dynamic Shared Object (DSO) ------------------------------------------------------ ! The first thing to ask yourself is why you want to do this. If your ! reason is that you think your Apache httpd binary is too large and ! that you will save memory by compiling PHP as a DSO you should ! probably stop reading right now and go back to a standard static ! compile as outlined in the 'INSTALL' file. Loading PHP dynamically ! does not save you memory. The only real advantage is that you ! can upgrade PHP without taking down and recompiling Apache. ! Method 1: The APXS Approach --------------------------- ! Step 1: Build Apache once and make sure mod_so is enabled. Something ! like this would do the trick: cd apache-1.3.x ./configure --prefix=/some/path --enable-shared=max --- 1,31 ---- Compiling PHP as an Apache Dynamic Shared Object (DSO) ------------------------------------------------------ ! A caveat before you continue. There have been reports of instability ! of the DSO version of Apache/PHP on some platforms. If you experience ! odd behaviour, try the static compile described in the INSTALL file. ! Also if you are not using at least Apache version 1.3.4, give up and ! go back to the static compile, or upgrade your Apache before continuing. + Contents of this file: ! METHOD 1: The APXS Approach ! METHOD 2: The --with-shared-apache approach ! Troubleshooting ! ! ! METHOD 1: The APXS Approach --------------------------- + + This is probably the slickest way to add PHP to an already + compiled/running Apache server. Your server must have been + built to include mod_so (you can check by typing httpd -l) + and it needs to have the 'apxs' Perl script installed and + configured for your setup. You can build such a server setup + using Step 1 below. ! Step 1: Build Apache once (if not already built) and make sure ! mod_so is enabled. Something like this would do the trick: cd apache-1.3.x ./configure --prefix=/some/path --enable-shared=max *************** *** 29,56 **** Step 2: Build PHP cd php-3.0.x ! ./configure --with-apxs=/some/path/bin/apxs \ ! --with-config-file-path=/some/path make make install You will of course most likely want more options here. Run ! ./configure --help ! for a full list. Step 3: Edit /some/path/conf/httpd.conf and make sure you have a line similar to: AddType application/x-httpd-php3 .php3 ! And copy php3.ini-dist to /some/path/php3.ini and have a look at it. ! Step 4: Restart your server: /some/path/bin/apachectl restart or /some/path/bin/apachectl graceful Troubleshooting --- 40,119 ---- Step 2: Build PHP cd php-3.0.x ! ./configure --with-apxs=/some/path/bin/apxs \ ! --with-config-file-path=/some/path make make install You will of course most likely want more options here. Run ! ./configure --help for a full list. Step 3: Edit /some/path/conf/httpd.conf and make sure you have a line similar to: AddType application/x-httpd-php3 .php3 + + If this is a brand new setup, you should of course also set the + other Apache site-specific things in your httpd.conf. + + You should also copy php3.ini-dist to /some/path/php3.ini and have a + look at it. + + Step 4: Start/Restart your server: ! /some/path/bin/apachectl start ! or /some/path/bin/apachectl restart or /some/path/bin/apachectl graceful + + + METHOD 2: The --with-shared-apache approach + + This method is not quite as slick as method 1, but it is useful if + for some reason you can't use the apxs approach. You need a full + Apache source tree in order to compile PHP using this approach whereas + in method 1 you only need the files produced by a 'make install' + from an Apache setup. + + Step 1: Make sure Apache's ./configure program has been run at least + once. You don't need to do a full compile, but the Apache ./configure + program generates some header files that PHP needs. The options you pass + to this Apache ./configure step are irrelevant. + + Step 2: Now you need to configure PHP and tell it where your Apache source + tree lives. Use something like this: + + ./configure --with-shared-apache=/some/path/to/src/of/apache-1.3.X \ + --with-config-file-path=/some/path + make + make install + + If you need specific extra PHP options, add other flags to the above configure + line. Run ./configure --help to see a full list. + + Step 3: Building Apache + + Go to your Apache src tree directory and run something like: + + ./configure --prefix=/some/path \ + --activate-module=src/modules/php3/libphp3.a \ + --enable-shared=php3 + make + make install + + If you already have a full Apache installation that predates the + 'make install' feature in Apache, I'd suggest doing a 'make install' + anyway, but set your --prefix directory to some temporary spot and + then go have a look at the files it generates. Especially the + httpd.conf entries to load the PHP module. The only extra thing you + need to do is uncomment (remove the initial #) from the php3 AddType + line. eg. it should look like this: + + AddType application/x-httpd-php3 .php3 Troubleshooting Index: php3/Makefile.in diff -c php3/Makefile.in:1.290 php3/Makefile.in:1.291 *** php3/Makefile.in:1.290 Sun Feb 7 03:00:14 1999 --- php3/Makefile.in Tue Feb 9 01:53:55 1999 *************** *** 24,30 **** # +----------------------------------------------------------------------+ # ! # $Id: Makefile.in,v 1.290 1999/02/07 08:00:14 rasmus Exp $ # prefix = @prefix@ --- 24,30 ---- # +----------------------------------------------------------------------+ # ! # $Id: Makefile.in,v 1.291 1999/02/09 06:53:55 rasmus Exp $ # prefix = @prefix@ *************** *** 105,120 **** php: $(OBJS) $(FUNCTIONS) @REGEX_LIB@ @FHTTPD_LIB@ @DBASE_LIB@ $(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(FUNCTIONS) $(LIBS) ! libphp3.a: $(OBJS) $(FUNCTIONS) @DBASE_LIB@ ! $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_LIB@ $(RANLIB) $(BINNAME) ! libmodphp3.a: $(OBJS) $(FUNCTIONS) @DBASE_LIB@ ! $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_LIB@ $(RANLIB) $(BINNAME) ! libmodphp3-so.a: $(OBJS) $(FUNCTIONS) @DBASE_LIB@ ! $(AR) libmodphp3-so.a $(OBJS) $(FUNCTIONS) @DBASE_LIB@ $(RANLIB) libmodphp3-so.a libphp3.so: mod_php3.c libmodphp3-so.a --- 105,120 ---- php: $(OBJS) $(FUNCTIONS) @REGEX_LIB@ @FHTTPD_LIB@ @DBASE_LIB@ $(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(FUNCTIONS) $(LIBS) ! libphp3.a: $(OBJS) $(FUNCTIONS) @DBASE_OBJS@ ! $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_OBJS@ $(RANLIB) $(BINNAME) ! libmodphp3.a: $(OBJS) $(FUNCTIONS) @DBASE_OBJS@ ! $(AR) $(BINNAME) $(OBJS) $(FUNCTIONS) @DBASE_OBJS@ $(RANLIB) $(BINNAME) ! libmodphp3-so.a: $(OBJS) $(FUNCTIONS) @DBASE_OBJS@ ! $(AR) libmodphp3-so.a $(OBJS) $(FUNCTIONS) @DBASE_OBJS@ $(RANLIB) libmodphp3-so.a libphp3.so: mod_php3.c libmodphp3-so.a Index: php3/configure.in diff -c php3/configure.in:1.316 php3/configure.in:1.317 *** php3/configure.in:1.316 Sun Feb 7 12:52:14 1999 --- php3/configure.in Tue Feb 9 01:53:55 1999 *************** *** 1,4 **** ! dnl $Id: configure.in,v 1.316 1999/02/07 17:52:14 rasmus Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(main.c) --- 1,4 ---- ! dnl $Id: configure.in,v 1.317 1999/02/09 06:53:55 rasmus Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(main.c) *************** *** 1627,1636 **** --- 1627,1638 ---- AC_DEFINE(DBASE,1) DBASE_LIB=dbase/libdbf.a DBASE_LIBS="-L./dbase -ldbf" + DBASE_OBJS="dbase/dbf_head.o dbase/dbf_rec.o dbase/dbf_misc.o dbase/dbf_ndx.o" else AC_MSG_RESULT(no) AC_DEFINE(DBASE,0) DBASE_LIB= + DBASE_OBJS= fi ],[ AC_MSG_RESULT(no) *************** *** 1639,1644 **** --- 1641,1647 ---- ]) AC_SUBST(DBASE_LIB) AC_SUBST(DBASE_LIBS) + AC_SUBST(DBASE_OBJS) AC_MSG_CHECKING(whether to include the bundled filePro support) Index: php3/libphp3.module.in diff -c php3/libphp3.module.in:1.18 php3/libphp3.module.in:1.19 *** php3/libphp3.module.in:1.18 Fri Jan 15 13:38:35 1999 --- php3/libphp3.module.in Tue Feb 9 01:53:56 1999 *************** *** 1,7 **** Name: php3_module ConfigStart RULE_WANTHSREGEX=@HSREGEX@ ! LIBS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S@ @GETTEXT_LIBS@ @LIBS@ $LIBS @DBM_LIB@" RULE_HIDE=yes ConfigEnd -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3994) next »