summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--INSTALL20
-rw-r--r--Makefile.in14
-rw-r--r--apMakefile.tmpl24
-rw-r--r--apidoc-zend.txt2
-rw-r--r--apidoc.txt4
-rw-r--r--configure.in.in32
-rw-r--r--ext/apache/apache.c2
-rw-r--r--libphp4.module.in (renamed from libphp3.module.in)4
-rw-r--r--main/main.c4
-rw-r--r--mod_php4.c (renamed from mod_php3.c)14
-rw-r--r--mod_php4.h (renamed from mod_php3.h)0
12 files changed, 64 insertions, 60 deletions
diff --git a/ChangeLog b/ChangeLog
index 76e826b96b..8d6fd5a936 100644
--- 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 6ab6615791..b8208d752c 100644
--- 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.
diff --git a/Makefile.in b/Makefile.in
index 4a7e9e3296..b119d7cf71 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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
diff --git a/apMakefile.tmpl b/apMakefile.tmpl
index e7ba023ed0..d5927e6734 100644
--- a/apMakefile.tmpl
+++ b/apMakefile.tmpl
@@ -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
diff --git a/apidoc-zend.txt b/apidoc-zend.txt
index 6472729f04..4667ed501a 100644
--- a/apidoc-zend.txt
+++ b/apidoc-zend.txt
@@ -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
diff --git a/apidoc.txt b/apidoc.txt
index b24961be9a..2b7fecde04 100644
--- a/apidoc.txt
+++ b/apidoc.txt
@@ -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.
diff --git a/configure.in.in b/configure.in.in
index cf21ad9fe9..fa749c3fee 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -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, [
], [
diff --git a/ext/apache/apache.c b/ext/apache/apache.c
index 8e81f49b75..8f72fbfbb2 100644
--- a/ext/apache/apache.c
+++ b/ext/apache/apache.c
@@ -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>
diff --git a/libphp3.module.in b/libphp4.module.in
index 5b234bf875..c2fa4e8e43 100644
--- a/libphp3.module.in
+++ b/libphp4.module.in
@@ -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
diff --git a/main/main.c b/main/main.c
index 3ee72cf905..f52b4365a2 100644
--- a/main/main.c
+++ b/main/main.c
@@ -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 */
diff --git a/mod_php3.c b/mod_php4.c
index 8c64c96f94..597aee71a3 100644
--- a/mod_php3.c
+++ b/mod_php4.c
@@ -53,18 +53,18 @@
#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 */
diff --git a/mod_php3.h b/mod_php4.h
index 35eeb50e7d..35eeb50e7d 100644
--- a/mod_php3.h
+++ b/mod_php4.h