]> granicus.if.org Git - php/commitdiff
Time to rename the child
authorZeev Suraski <zeev@php.net>
Sat, 22 May 1999 09:24:21 +0000 (09:24 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 22 May 1999 09:24:21 +0000 (09:24 +0000)
12 files changed:
ChangeLog
INSTALL
Makefile.in
apMakefile.tmpl
apidoc-zend.txt
apidoc.txt
configure.in.in
ext/apache/apache.c
libphp4.module.in [moved from libphp3.module.in with 87% similarity]
main/main.c
mod_php4.c [moved from mod_php3.c with 98% similarity]
mod_php4.h [moved from mod_php3.h with 100% similarity]

index 76e826b96b0774fa91a099800d8fa14ad7acc41d..8d6fd5a9360fa19aa24b4ac9a52b27e8a75e2f41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -223,7 +223,7 @@ July 18 1998 Version 3.0.2
   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 @@ March 30 1998 Version 3.0 Release Candidate 2
   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
diff --git a/INSTALL b/INSTALL
index 6ab661579189ef979a3921fddc10f1c5430f728a..b8208d752cd5f2c80d18569534328f4f12c5606e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -19,8 +19,8 @@ cd ../php-3.0.x
 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 @@ Installing PHP3 can be done in four simple steps:
 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 @@ Installing PHP3 can be done in four simple steps:
 
        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 @@ Installing PHP3 can be done in four simple steps:
 
    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 @@ Installing PHP3 can be done in four simple steps:
        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 4a7e9e3296101da26a509fd09cb3785411ec44d0..b119d7cf715ba978c936a4dc4fa3ccb2568c96d0 100644 (file)
@@ -87,22 +87,22 @@ php: all-recursive $(OBJS) @REGEX_LIB@ @FHTTPD_LIB@ @TSRM_LIB@
        $(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 @@ configuration-scanner.c:    $(srcdir)/configuration-scanner.l
        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 @@ distclean: clean distclean-recursive
        -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 e7ba023ed0a7c0fdc9e1eef9bc916be4716f5e87..d5927e673431e8fe98b946db2060c3881bc78f1f 100644 (file)
@@ -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 @@ depend:
 $(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 6472729f04c535c651f83b57dfe2d208f116adf4..4667ed501a54479bf6ab2dbea473bec13f39af83 100644 (file)
@@ -163,7 +163,7 @@ cfg_hash into php3_ini.
 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 b24961be9a70827d3103dab58135684678062cf1..2b7fecde046734c20a34e3ecc67efbf7bb26aa9d 100644 (file)
@@ -471,13 +471,13 @@ handy when a server supports multiple virtual hosts.
 
 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 cf21ad9fe9c997dfec29ad1cfbcca2d9374d2051..fa749c3feede98a07306015b52f4afc3583d4db6 100644 (file)
@@ -328,7 +328,7 @@ AC_ARG_WITH(apxs,
     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 @@ AC_ARG_WITH(apxs,
 ])
 
 
-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 @@ AC_ARG_WITH(shared-apache,
        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 @@ AC_ARG_WITH(shared-apache,
                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 @@ AC_ARG_WITH(shared-apache,
 
 
 
-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 @@ AC_ARG_WITH(apache,
          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 @@ AC_ARG_WITH(apache,
 # 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 @@ AC_ARG_WITH(apache,
 # 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 @@ AC_ARG_WITH(apache,
          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 @@ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME")
 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 8e81f49b755e7549e94dc4eb19d01313f16fa0f4..8f72fbfbb2b5d5e71265cbfa0fad26befcf02c0c 100644 (file)
@@ -35,7 +35,7 @@
 #include "php_globals.h"
 #include "php_ini.h"
 #include "SAPI.h"
-#include "mod_php3.h"
+#include "mod_php4.h"
 #include "ext/standard/info.h"
 
 #include <stdlib.h>
similarity index 87%
rename from libphp3.module.in
rename to libphp4.module.in
index 5b234bf8759e12c2dfa6e7a1148689cb0752cbb0..c2fa4e8e4316dcaa4f72bd922f7dc84ebf11a079 100644 (file)
@@ -1,7 +1,7 @@
-Name: php3_module
+Name: php4_module
 ConfigStart
        RULE_WANTHSREGEX=@HSREGEX@
        LIBS="@PHP_LIBS@ @EXTRA_LIBS@ @LIBS@ @RDYNAMIC_LFLAGS@ $LIBS"
        RULE_HIDE=yes
        CFLAGS="$CFLAGS -I@abs_srcdir@ -I@abs_srcdir@/libzend -I@abs_builddir@"
-ConfigEnd
\ No newline at end of file
+ConfigEnd
index 3ee72cf905ad011cadaf4ac468e68e39ad0adc2a..f52b4365a23331ace508106684328b8373d2f1c6 100644 (file)
@@ -1213,6 +1213,7 @@ PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mo
 #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 @@ PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mo
        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 */
similarity index 98%
rename from mod_php3.c
rename to mod_php4.c
index 8c64c96f947f0eeb4069726b9716d9039978f391..597aee71a377693ef924103599ccf9fe9cbb267a 100644 (file)
 #include "util_script.h"
 
 #include "php_version.h"
-#include "mod_php3.h"
+#include "mod_php4.h"
 #if HAVE_MOD_DAV
 # include "mod_dav.h"
 #endif
 
 PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mode SLS_DC);
 
-/* ### these should be defined in mod_php3.h or somewhere else */
+/* ### these should be defined in mod_php4.h or somewhere else */
 #define USE_PATH 1
 #define IGNORE_URL 2
 
-module MODULE_VAR_EXPORT php3_module;
+module MODULE_VAR_EXPORT php4_module;
 
 int saved_umask;
 
@@ -366,7 +366,7 @@ int php3_xbithack_handler(request_rec * r)
 {
        php_apache_info_struct *conf;
 
-       conf = (php_apache_info_struct *) get_module_config(r->per_dir_config, &php3_module);
+       conf = (php_apache_info_struct *) get_module_config(r->per_dir_config, &php4_module);
        if (!(r->finfo.st_mode & S_IXUSR)) {
                r->allowed |= (1 << METHODS) - 1;
                return DECLINED;
@@ -400,7 +400,7 @@ int send_parsed_php3_dav_script(request_rec *r)
        php_apache_info_struct *conf;
 
        conf = (php_apache_info_struct *) get_module_config(r->per_dir_config,
-                                                                                                       &php3_module);
+                                                                                                       &php4_module);
        return send_php3(r, 0, 0, conf->dav_script);
 }
 
@@ -409,7 +409,7 @@ static int php3_type_checker(request_rec *r)
        php_apache_info_struct *conf;
 
        conf = (php_apache_info_struct *)get_module_config(r->per_dir_config,
-                                                                                                  &php3_module);
+                                                                                                  &php4_module);
 
     /* If DAV support is enabled, use mod_dav's type checker. */
     if (conf->dav_script) {
@@ -448,7 +448,7 @@ command_rec php3_commands[] =
 
 
 
-module MODULE_VAR_EXPORT php3_module =
+module MODULE_VAR_EXPORT php4_module =
 {
        STANDARD_MODULE_STUFF,
        php3_init_handler,                      /* initializer */
similarity index 100%
rename from mod_php3.h
rename to mod_php4.h