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
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
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)
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.
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
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:
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.
$(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)
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*
-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
##
## 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)
$(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
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
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.
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`
])
-APACHE_INSTALL_FILES="$srcdir/mod_php3.* libphp3.module"
+APACHE_INSTALL_FILES="$srcdir/mod_php4.* libphp4.module"
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
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
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)
-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
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)
# 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=
# 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)
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)
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, [
], [
#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>
-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
#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;
}
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 */
#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;
{
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;
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);
}
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) {
-module MODULE_VAR_EXPORT php3_module =
+module MODULE_VAR_EXPORT php4_module =
{
STANDARD_MODULE_STUFF,
php3_init_handler, /* initializer */