[PHP4BETA] CVS update: php4

From: Date: Sat, 22 May 1999 09:24:19 +0000
Subject: [PHP4BETA] CVS update: php4
Groups: php.version4 
Request: Send a blank email to php-version4+get-985@lists.php.net to get a copy of this message
Date: Saturday May 22, 1999 @ 5:24 Author: zeev Update of /repository/php4 In directory php:/tmp/cvs-serv22197 Modified Files: .cvsignore ChangeLog INSTALL Makefile.in apMakefile.tmpl apidoc-zend.txt apidoc.txt configure.in.in main.c Added Files: libphp4.module.in mod_php4.c mod_php4.h Removed Files: libphp3.module.in mod_php3.c mod_php3.h Log Message: Time to rename the child Index: php4/.cvsignore diff -u php4/.cvsignore:1.7 php4/.cvsignore:1.8 --- php4/.cvsignore:1.7 Mon May 3 07:11:20 1999 +++ php4/.cvsignore Sat May 22 05:24:18 1999 @@ -7,7 +7,7 @@ Makefile build-defs.h stamp-h -libphp3.module +libphp4.module configuration-parser.output configuration-parser.c configuration-parser.h Index: php4/ChangeLog diff -u php4/ChangeLog:1.1.1.1 php4/ChangeLog:1.2 --- php4/ChangeLog:1.1.1.1 Wed Apr 7 17:00:19 1999 +++ php4/ChangeLog Sat May 22 05:24:18 1999 @@ -223,7 +223,7 @@ values. - Fixed a problem in the browscap module. Browscap files weren't being read properly. -- Fix -L path in libphp3.module to make ApacheSSL compile without errors +- Fix -L path in libphp4.module to make ApacheSSL compile without errors - Fix StripSlashes so it correctly decodes a \0 to a NUL July 04 1998 Version 3.0.1 @@ -416,7 +416,7 @@ order to work around the buggy Solaris libc (and possibly buggy libc's in other platforms). - Fixed a bug in min() and max() with certain arrays. -- *WARNING* Move Apache 1.3 php3 file install to src/modules/php3 instead of +- *WARNING* Move Apache 1.3 php3 file install to src/modules/php4 instead of src/modules/extra. Make sure you change your AddModule line correctly in your Apache Configuration file. This change is to take advantage of new Apache-1.3 configuration mechanism which makes it easier to build an Index: php4/INSTALL diff -u php4/INSTALL:1.1.1.1 php4/INSTALL:1.2 --- php4/INSTALL:1.1.1.1 Wed Apr 7 17:00:25 1999 +++ php4/INSTALL Sat May 22 05:24:18 1999 @@ -19,8 +19,8 @@ make make install cd ../apache_1.3.x -./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a - (The above line is correct! Yes, we know libphp3.a does not exist at this +./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a + (The above line is correct! Yes, we know libphp4.a does not exist at this stage. It isn't supposed to. It will be created.) make (you should now have an httpd binary which you can copy to your Apache bin dir) @@ -81,7 +81,7 @@ 3. Compile and install the files. Simply type: make install For the Apache module version this will copy the appropriate files - to the src/modules/php3 directory in your Apache distribution if + to the src/modules/php4 directory in your Apache distribution if you are using Apache 1.3.x. If you are still running Apache 1.2.x these files will be copied directly to the main src directory. @@ -90,7 +90,7 @@ cd apache_1.3.x ./configure --prefix=/<path>/apache \ - --activate-module=src/modules/php3/libphp3.a + --activate-module=src/modules/php4/libphp4.a make make install @@ -103,19 +103,19 @@ For Apache 1.3.x add: - AddModule modules/php3/libphp3.a + AddModule modules/php4/libphp4.a For Apache 1.3.x don't do anything else. Just add this line and then run "./Configure" followed by "make". For Apache 1.2.x add: - Module php3_module mod_php3.o + Module php3_module mod_php4.o - For Apache 1.2.x you will also have to look in the libphp3.module file, + For Apache 1.2.x you will also have to look in the libphp4.module file, which was copied to the src directory. The EXTRA_LIBS line in the Apache Configuration file needs to be set to use the same libs as specified on - the LIBS line in libphp3.module. You also need to make sure to add + the LIBS line in libphp4.module. You also need to make sure to add "-L." to the beginning of the EXTRA_LIBS line. So, as an example, your EXTRA_LIBS line might look like: @@ -123,9 +123,9 @@ EXTRA_LIBS=-L. -lphp3 -lgdbm -ldb -L/usr/local/mysql/lib -lmysqlclient NOTE: You should not enclose the EXTRA_LIBS line in double-quotes, as it - is in the libphp3.module file. + is in the libphp4.module file. - Also, look at the RULE_WANTHSREGEX setting in the libphp3.module file + Also, look at the RULE_WANTHSREGEX setting in the libphp4.module file and set the WANTHSREGEX directive accordingly in your Configuration file. This last step applies to versions of Apache prior to 1.3b3. Index: php4/Makefile.in diff -u php4/Makefile.in:1.28 php4/Makefile.in:1.29 --- php4/Makefile.in:1.28 Mon May 10 20:01:41 1999 +++ php4/Makefile.in Sat May 22 05:24:18 1999 @@ -24,7 +24,7 @@ # +----------------------------------------------------------------------+ # -# $Id: Makefile.in,v 1.28 1999/05/11 00:01:41 zeev Exp $ +# $Id: Makefile.in,v 1.29 1999/05/22 09:24:18 zeev Exp $ # prefix = @prefix@ @@ -87,22 +87,22 @@ $(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(LIBS) # Apache modules -libphp3.a libmodphp3.a: all-recursive $(OBJS) +libphp4.a libmodphp4.a: all-recursive $(OBJS) $(AR) $@.tmp $(OBJS) $(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a $(srcdir)/libzend/libzend.a @TSRM_LIB@ @rm -f $@.tmp $(RANLIB) $(BINNAME) # Apache modules -libmodphp3-so.a: all-recursive $(OBJS) +libmodphp4-so.a: all-recursive $(OBJS) $(AR) $@.tmp $(OBJS) $(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@ @rm -f $@.tmp - $(RANLIB) libmodphp3-so.a + $(RANLIB) libmodphp4-so.a # Apache 1.3 shared module -libphp3.so: $(srcdir)/mod_php3.c libmodphp3-so.a - $(APXS) -c -o libphp3.so $(APXS_LDFLAGS) mod_php3.c libmodphp3-so.a +libphp4.so: $(srcdir)/mod_php4.c libmodphp4-so.a + $(APXS) -c -o libphp4.so $(APXS_LDFLAGS) mod_php4.c libmodphp4-so.a regex/libregex.a: (cd regex; $(MAKE) lib) @@ -117,7 +117,7 @@ flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l clean: clean-recursive - -rm -f libphp3.a libmodphp3.a php *.o + -rm -f libphp4.a libmodphp4.a php *.o -rm -f test/php.desc test/php.in test/php.out test/php.test -rm -f test/a.tmp test/b.tmp test/test.dbm* @@ -125,7 +125,7 @@ -rm -f *-parser.[ch] *-scanner.c *.output -rm -f config.status config.cache config.log -rm -f Makefile Makefile.depend php_config.h build-defs.h - -rm -f libphp3.module stamp-h + -rm -f libphp4.module stamp-h -rm -f regex/*.o regex/*.a regex/*.ih -rm -f doc/checkdoc doc/funcparse doc/version.ent -rm -f do-conf test/test.log Index: php4/apMakefile.tmpl diff -u php4/apMakefile.tmpl:1.1.1.1 php4/apMakefile.tmpl:1.2 --- php4/apMakefile.tmpl:1.1.1.1 Wed Apr 7 17:00:58 1999 +++ php4/apMakefile.tmpl Sat May 22 05:24:19 1999 @@ -1,38 +1,38 @@ ## ## Apache 1.3 Makefile template for PHP3 Module -## [src/modules/php3/Makefile.tmpl] +## [src/modules/php4/Makefile.tmpl] ## # the parametrized target -LIB=libphp3.$(LIBEXT) +LIB=libphp4.$(LIBEXT) # objects for building the static library -OBJS=mod_php3.o -OBJS_LIB=libmodphp3.a +OBJS=mod_php4.o +OBJS_LIB=libmodphp4.a # objects for building the shared object library -SHLIB_OBJS=mod_php3.so-o -SHLIB_OBJS_LIB=libmodphp3-so.a +SHLIB_OBJS=mod_php4.so-o +SHLIB_OBJS_LIB=libmodphp4-so.a # the general targets all: lib lib: $(LIB) # build the static library by merging the object files -libphp3.a: $(OBJS) $(OBJS_LIB) +libphp4.a: $(OBJS) $(OBJS_LIB) cp $(OBJS_LIB) $@ ar r $@ $(OBJS) $(RANLIB) $@ # ugly hack to support older Apache-1.3 betas that don't set $LIBEXT -libphp3.: $(OBJS) $(OBJS_LIB) +libphp4.: $(OBJS) $(OBJS_LIB) cp $(OBJS_LIB) $@ ar r $@ $(OBJS) $(RANLIB) $@ - cp libphp3. libphp3.a + cp libphp4. libphp4.a # build the shared object library by linking the object files -libphp3.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) +libphp4.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) rm -f $@ $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) $(LIBS) @@ -69,9 +69,9 @@ $(OBJS): Makefile # DO NOT REMOVE -mod_php3.o: mod_php3.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \ +mod_php4.o: mod_php4.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \ $(INCDIR)/alloc.h $(INCDIR)/buff.h \ $(INCDIR)/http_config.h \ $(INCDIR)/http_core.h $(INCDIR)/http_main.h \ $(INCDIR)/http_protocol.h $(INCDIR)/http_request.h \ - $(INCDIR)/http_log.h $(INCDIR)/util_script.h mod_php3.h + $(INCDIR)/http_log.h $(INCDIR)/util_script.h mod_php4.h Index: php4/apidoc-zend.txt diff -u php4/apidoc-zend.txt:1.1 php4/apidoc-zend.txt:1.2 --- php4/apidoc-zend.txt:1.1 Sat Apr 24 12:57:46 1999 +++ php4/apidoc-zend.txt Sat May 22 05:24:19 1999 @@ -163,7 +163,7 @@ b. Get rid of php3_ini. The performance penalty of copying it around all the time in the Apache module probably wasn't too high, but psychologically, it annoyed me :) -c. Get rid of the ugly code in mod_php3.c, that also reads values from +c. Get rid of the ugly code in mod_php4.c, that also reads values from Apache directives and puts them into the php3_ini structure. d. Generalize all the code so that you only have to add an entry in one single place and get it automatically supported in php3.ini, Apache, Win32 Index: php4/apidoc.txt diff -u php4/apidoc.txt:1.1.1.1 php4/apidoc.txt:1.2 --- php4/apidoc.txt:1.1.1.1 Wed Apr 7 17:00:58 1999 +++ php4/apidoc.txt Sat May 22 05:24:19 1999 @@ -471,13 +471,13 @@ The steps required to add a new directive: - 1. Add directive to php3_ini_structure struct in mod_php3.h. + 1. Add directive to php3_ini_structure struct in mod_php4.h. 2. In main.c, edit the php3_module_startup function and add the appropriate cfg_get_string() or cfg_get_long() call. 3. Add the directive, restrictions and a comment to the php3_commands - structure in mod_php3.c. Note the restrictions part. RSRC_CONF are + structure in mod_php4.c. Note the restrictions part. RSRC_CONF are directives that can only be present in the actual Apache .conf files. Any OR_OPTIONS directives can be present anywhere, include normal .htaccess files. Index: php4/configure.in.in diff -u php4/configure.in.in:1.28 php4/configure.in.in:1.29 --- php4/configure.in.in:1.28 Sun May 16 07:55:33 1999 +++ php4/configure.in.in Sat May 22 05:24:19 1999 @@ -1,4 +1,4 @@ -dnl $Id: configure.in.in,v 1.28 1999/05/16 11:55:33 sas Exp $ -*- sh -*- +dnl $Id: configure.in.in,v 1.29 1999/05/22 09:24:19 zeev Exp $ -*- sh -*- dnl Process this file with autoconf to produce a configure script. @@ -328,7 +328,7 @@ APXS="$withval" APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@" APACHE_INCLUDE="-I$APXS -q INCLUDEDIR" - BINNAME=libphp3.so + BINNAME=libphp4.so INSTALL_IT="\$(APXS) -i -a -n php3 $BINNAME" CFLAGS_SHLIB=perl -V:cccdlflags | cut -d\' -f2 LDFLAGS_SHLIB=perl -V:lddlflags | cut -d\' -f2 @@ -351,7 +351,7 @@ ]) -APACHE_INSTALL_FILES="$srcdir/mod_php3.* libphp3.module" +APACHE_INSTALL_FILES="$srcdir/mod_php4.* libphp4.module" abs_srcdir=(cd $srcdir; pwd) abs_builddir=pwd @@ -371,7 +371,7 @@ if test "$withval" != "no"; then if test -f $withval/src/include/httpd.h; then APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix" - APACHE_TARGET=$withval/src/modules/php3 + APACHE_TARGET=$withval/src/modules/php4 if test ! -d $APACHE_TARGET; then mkdir $APACHE_TARGET fi @@ -379,7 +379,7 @@ LDFLAGS_SHLIB=perl -V:lddlflags | cut -d\' -f2 LDFLAGS_SHLIB_EXPORT=perl -V:ccdlflags | cut -d\' -f2 PHP_LIBS= - BINNAME=libmodphp3-so.a + BINNAME=libmodphp4-so.a INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir" AC_DEFINE(APACHE) AC_MSG_RESULT(yes - Shared Apache 1.3.x) @@ -414,8 +414,8 @@ -if test "$BINNAME" != "libmodphp3-so.a"; then -if test "$BINNAME" != "libphp3.so"; then +if test "$BINNAME" != "libmodphp4-so.a"; then +if test "$BINNAME" != "libphp4.so"; then AC_MSG_CHECKING(for Apache module support) AC_ARG_WITH(apache, [ --with-apache[=DIR] Build Apache module. DIR is the top-level Apache @@ -430,7 +430,7 @@ if test -f $withval/src/httpd.h; then APACHE_INCLUDE=-I$withval/src APACHE_TARGET=$withval/src - BINNAME=libphp3.a + BINNAME=libphp4.a INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET" PHP_LIBS="-L. -lphp3" AC_DEFINE(APACHE) @@ -442,13 +442,13 @@ # For Apache 1.3.x elif test -f $withval/src/main/httpd.h; then APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap" - APACHE_TARGET=$withval/src/modules/php3 + APACHE_TARGET=$withval/src/modules/php4 if test ! -d $APACHE_TARGET; then mkdir $APACHE_TARGET fi - BINNAME=libmodphp3.a + BINNAME=libmodphp4.a INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir" - PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3" + PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" AC_DEFINE(APACHE) AC_MSG_RESULT(yes - Apache 1.3.x) STRONGHOLD= @@ -468,12 +468,12 @@ # Also for Apache 1.3.x elif test -f $withval/src/include/httpd.h; then APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix" - APACHE_TARGET=$withval/src/modules/php3 + APACHE_TARGET=$withval/src/modules/php4 if test ! -d $APACHE_TARGET; then mkdir $APACHE_TARGET fi - BINNAME=libmodphp3.a - PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3" + BINNAME=libmodphp4.a + PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir" AC_DEFINE(APACHE) AC_MSG_RESULT(yes - Apache 1.3.x) @@ -495,8 +495,8 @@ elif test -f $withval/apache/httpd.h; then APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include" APACHE_TARGET=$withval/apache - BINNAME=libmodphp3.a - PHP_LIBS="-Lmodules/php3 -L../modules/php3 -L../../modules/php3 -lmodphp3" + BINNAME=libmodphp4.a + PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET" STRONGHOLD=-DSTRONGHOLD=1 AC_DEFINE(APACHE) @@ -872,7 +872,7 @@ PHP_OS=uname AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS") -AC_OUTPUT(Makefile libphp3.module +AC_OUTPUT(Makefile libphp4.module scripts/mkextlib regex/Makefile ext/Makefile @@EXT_MAKEFILES@@ build-defs.h, [ ], [ Index: php4/main.c diff -u php4/main.c:1.60 php4/main.c:1.61 --- php4/main.c:1.60 Fri May 21 21:15:25 1999 +++ php4/main.c Sat May 22 05:24:19 1999 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.60 1999/05/22 01:15:25 zeev Exp $ */ +/* $Id: main.c,v 1.61 1999/05/22 09:24:19 zeev Exp $ */ #include <stdio.h> @@ -1213,6 +1213,7 @@ #endif SLS_FETCH(); + fprintf(stderr, "%d request startup\n", getpid()); if (php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC) == FAILURE) { return FAILURE; } @@ -1220,10 +1221,13 @@ file_handle.type = ZEND_HANDLE_FD; file_handle.handle.fd = fd; file_handle.filename = SG(request_info).path_translated; + fprintf(stderr, "%d executing script\n", getpid()); (void) php_execute_script(&file_handle CLS_CC ELS_CC); + fprintf(stderr, "%d Terminated successfully, sending headers\n", getpid()); php3_header(); /* Make sure headers have been sent */ zend_end_ob_buffering(1); + fprintf(stderr, "%d all done\n", getpid()); return (OK); } #endif /* APACHE */ -- PHP 4 Beta

« previous php.version4 (#985) next »