Skip to content

Commit 3f700e5

Browse files
author
Sterling Hughes
committed
update php module name to php5, not php4.
apache, apache2* and cli/cgi work. sapi module maintainers should fix up their sapis, as I don't run any servers with php outside of apache.
1 parent 789b0a8 commit 3f700e5

20 files changed

Lines changed: 76 additions & 76 deletions

Makefile.global

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ all: $(all_targets)
1010

1111
build-modules: $(PHP_MODULES)
1212

13-
libphp4.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
13+
libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
1414
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
1515

16-
libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
17-
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so
16+
libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
17+
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp5.so
1818

1919
install: $(install_targets)
2020

21-
install-sapi: libphp4.la
21+
install-sapi: libphp5.la
2222
@echo "Installing PHP SAPI module"
23-
-@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
23+
-@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
2424
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
25-
-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
25+
-@if test ! -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); then \
2626
for i in 0.0.0 0.0 0; do \
27-
if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
28-
$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
27+
if test -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i; then \
28+
$(LN_S) $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); \
2929
break; \
3030
fi; \
3131
done; \
@@ -57,10 +57,10 @@ clean:
5757
find . -name \*.la -o -name \*.a | xargs rm -f
5858
find . -name \*.so | xargs rm -f
5959
find . -name .libs -a -type d|xargs rm -rf
60-
rm -f libphp4.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
60+
rm -f libphp5.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
6161

6262
distclean: clean
63-
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp
63+
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp5.module buildmk.stamp
6464
egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f
6565
find . -name Makefile | xargs rm -f
6666

acinclude.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ dnl PHP_BUILD_SHARED
781781
dnl
782782
AC_DEFUN([PHP_BUILD_SHARED],[
783783
PHP_BUILD_PROGRAM
784-
OVERALL_TARGET=libphp4.la
784+
OVERALL_TARGET=libphp5.la
785785
php_build_target=shared
786786
787787
php_c_pre=$shared_c_pre
@@ -798,7 +798,7 @@ dnl PHP_BUILD_STATIC
798798
dnl
799799
AC_DEFUN([PHP_BUILD_STATIC],[
800800
PHP_BUILD_PROGRAM
801-
OVERALL_TARGET=libphp4.la
801+
OVERALL_TARGET=libphp5.la
802802
php_build_target=static
803803
])
804804

@@ -807,7 +807,7 @@ dnl PHP_BUILD_BUNDLE
807807
dnl
808808
AC_DEFUN([PHP_BUILD_BUNDLE],[
809809
PHP_BUILD_PROGRAM
810-
OVERALL_TARGET=libs/libphp4.bundle
810+
OVERALL_TARGET=libs/libphp5.bundle
811811
php_build_target=static
812812
])
813813

configure.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ dnl SAPI configuration.
229229
dnl -------------------------------------------------------------------------
230230

231231
dnl paths to the targets are relative to the build directory
232-
SAPI_SHARED=libs/libphp4.$SHLIB_SUFFIX_NAME
233-
SAPI_STATIC=libs/libphp4.a
234-
SAPI_LIBTOOL=libphp4.la
232+
SAPI_SHARED=libs/libphp5.$SHLIB_SUFFIX_NAME
233+
SAPI_STATIC=libs/libphp5.a
234+
SAPI_LIBTOOL=libphp5.la
235235

236236
PHP_CONFIGURE_PART(Configuring SAPI modules)
237237

sapi/apache/apMakefile.tmpl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
##
2-
## Apache 1.3 Makefile template for PHP 4.0 Module
3-
## [src/modules/php4/Makefile.tmpl]
2+
## Apache 1.3 Makefile template for PHP 5.0 Module
3+
## [src/modules/php5/Makefile.tmpl]
44
##
55

66
# the parametrized target
7-
LIB=libphp4.$(LIBEXT)
7+
LIB=libphp5.$(LIBEXT)
88

99
# objects for building the static library
10-
OBJS=mod_php4.o
11-
OBJS_LIB=libmodphp4.a
10+
OBJS=mod_php5.o
11+
OBJS_LIB=libmodphp5.a
1212

1313
# objects for building the shared object library
14-
SHLIB_OBJS=mod_php4.so-o
15-
SHLIB_OBJS_LIB=libmodphp4.a
14+
SHLIB_OBJS=mod_php5.so-o
15+
SHLIB_OBJS_LIB=libmodphp5.a
1616

1717
# the general targets
1818
all: lib
1919
lib: $(LIB)
2020

2121
# build the static library by merging the object files
22-
libphp4.a: $(OBJS) $(OBJS_LIB)
22+
libphp5.a: $(OBJS) $(OBJS_LIB)
2323
cp $(OBJS_LIB) $@
2424
ar r $@ $(OBJS)
2525
$(RANLIB) $@
2626

2727
# ugly hack to support older Apache-1.3 betas that don't set $LIBEXT
28-
libphp4.: $(OBJS) $(OBJS_LIB)
28+
libphp5.: $(OBJS) $(OBJS_LIB)
2929
cp $(OBJS_LIB) $@
3030
ar r $@ $(OBJS)
3131
$(RANLIB) $@
32-
cp libphp4. libphp4.a
32+
cp libphp5. libphp5.a
3333

3434
# build the shared object library by linking the object files
35-
libphp4.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB)
35+
libphp5.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB)
3636
rm -f $@
3737
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) $(LIBS) $(PHP_LIBS)
3838

@@ -69,9 +69,9 @@ depend:
6969
$(OBJS): Makefile
7070

7171
# DO NOT REMOVE
72-
mod_php4.o: mod_php4.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
72+
mod_php5.o: mod_php5.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
7373
$(INCDIR)/buff.h \
7474
$(INCDIR)/http_config.h \
7575
$(INCDIR)/http_core.h $(INCDIR)/http_main.h \
7676
$(INCDIR)/http_protocol.h $(INCDIR)/http_request.h \
77-
$(INCDIR)/http_log.h $(INCDIR)/util_script.h mod_php4.h
77+
$(INCDIR)/http_log.h $(INCDIR)/util_script.h mod_php5.h

sapi/apache/config.m4

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,34 +58,34 @@ AC_ARG_WITH(apxs,
5858
*darwin*)
5959
MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD"
6060
PHP_SUBST(MH_BUNDLE_FLAGS)
61-
SAPI_SHARED=libs/libphp4.so
61+
SAPI_SHARED=libs/libphp5.so
6262
build_type=bundle
6363
;;
6464
*)
6565
build_type=shared
6666
;;
6767
esac
6868
69-
PHP_SELECT_SAPI(apache, $build_type, sapi_apache.c mod_php4.c php_apache.c, $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR)
69+
PHP_SELECT_SAPI(apache, $build_type, sapi_apache.c mod_php5.c php_apache.c, $APACHE_CPPFLAGS -I$APXS_INCLUDEDIR)
7070
7171
# Test whether apxs support -S option
7272
$APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1
7373
7474
if test "$?" != "0"; then
75-
APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED" # Old apxs does not have -S option
75+
APACHE_INSTALL="$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs does not have -S option
7676
else
7777
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
7878
if test -z `$APXS -q SYSCONFDIR`; then
7979
APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
8080
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
81-
-i -n php4 $SAPI_SHARED"
81+
-i -n php5 $SAPI_SHARED"
8282
else
8383
APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
8484
APACHE_INSTALL="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
8585
\$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
8686
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
8787
-S SYSCONFDIR='$APXS_SYSCONFDIR' \
88-
-i -a -n php4 $SAPI_SHARED"
88+
-i -a -n php5 $SAPI_SHARED"
8989
fi
9090
fi
9191
@@ -107,7 +107,7 @@ AC_ARG_WITH(apache,
107107
[ --with-apache[=DIR] Build Apache 1.x module. DIR is the top-level Apache
108108
build directory, defaults to /usr/local/apache.],[
109109
110-
APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php4.* sapi/apache/libphp4.module"
110+
APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php5.* sapi/apache/libphp5.module"
111111
112112
if test "$withval" = "yes"; then
113113
# Apache's default directory
@@ -121,7 +121,7 @@ AC_ARG_WITH(apache,
121121
if test -f $withval/src/httpd.h; then
122122
APACHE_INCLUDE=-I$withval/src
123123
APACHE_TARGET=$withval/src
124-
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE)
124+
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
125125
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_INSTALL_FILES $APACHE_TARGET"
126126
PHP_LIBS="-L. -lphp3"
127127
AC_MSG_RESULT(yes - Apache 1.2.x)
@@ -137,13 +137,13 @@ AC_ARG_WITH(apache,
137137
elif test -f $withval/src/main/httpd.h; then
138138
APACHE_HAS_REGEX=1
139139
APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
140-
APACHE_TARGET=$withval/src/modules/php4
140+
APACHE_TARGET=$withval/src/modules/php5
141141
if test ! -d $APACHE_TARGET; then
142142
mkdir $APACHE_TARGET
143143
fi
144-
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE)
145-
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
146-
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
144+
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
145+
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
146+
PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
147147
AC_MSG_RESULT(yes - Apache 1.3.x)
148148
STRONGHOLD=
149149
if test -f $withval/src/include/ap_config.h; then
@@ -163,13 +163,13 @@ AC_ARG_WITH(apache,
163163
elif test -f $withval/src/include/httpd.h; then
164164
APACHE_HAS_REGEX=1
165165
APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
166-
APACHE_TARGET=$withval/src/modules/php4
166+
APACHE_TARGET=$withval/src/modules/php5
167167
if test ! -d $APACHE_TARGET; then
168168
mkdir $APACHE_TARGET
169169
fi
170-
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE)
171-
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
172-
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
170+
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
171+
PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
172+
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
173173
AC_MSG_RESULT(yes - Apache 1.3.x)
174174
STRONGHOLD=
175175
if test -f $withval/src/include/ap_config.h; then
@@ -189,9 +189,9 @@ AC_ARG_WITH(apache,
189189
elif test -f $withval/apache/httpd.h; then
190190
APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include"
191191
APACHE_TARGET=$withval/apache
192-
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE)
193-
PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
194-
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
192+
PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php5.c php_apache.c, $APACHE_INCLUDE)
193+
PHP_LIBS="-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5"
194+
APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp5.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
195195
STRONGHOLD=-DSTRONGHOLD=1
196196
AC_MSG_RESULT(yes - StrongHold)
197197
if test -f $withval/apache/ap_config.h; then
@@ -221,7 +221,7 @@ AC_ARG_WITH(apache,
221221
fi
222222

223223
if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then
224-
APXS_EXP=-bE:sapi/apache/mod_php4.exp
224+
APXS_EXP=-bE:sapi/apache/mod_php5.exp
225225
fi
226226

227227
PHP_SUBST(APXS_EXP)
@@ -256,7 +256,7 @@ AC_ARG_WITH(mod_charset,
256256
if test -n "$APACHE_MODULE"; then
257257
PHP_TARGET_RDYNAMIC
258258
$php_shtool mkdir -p sapi/apache
259-
PHP_OUTPUT(sapi/apache/libphp4.module)
259+
PHP_OUTPUT(sapi/apache/libphp5.module)
260260
fi
261261

262262
if test -n "$APACHE_INSTALL"; then
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Name: php4_module
1+
Name: php5_module
22
ConfigStart
33
RULE_WANTHSREGEX=no
44
RULE_HIDE=yes

sapi/apache/mod_php4.exp

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ static CONST_PREFIX char *php_apache_flag_handler(cmd_parms *cmd, HashTable *con
6464
static CONST_PREFIX char *php_apache_flag_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode);
6565
static CONST_PREFIX char *php_apache_admin_flag_handler(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2);
6666

67-
/* ### these should be defined in mod_php4.h or somewhere else */
67+
/* ### these should be defined in mod_php5.h or somewhere else */
6868
#define USE_PATH 1
6969
#define IGNORE_URL 2
7070

71-
module MODULE_VAR_EXPORT php4_module;
71+
module MODULE_VAR_EXPORT php5_module;
7272

7373
int saved_umask;
7474
static unsigned char apache_php_initialized;
@@ -557,7 +557,7 @@ static int send_php(request_rec *r, int display_source_mode, char *filename)
557557
return DECLINED;
558558
}
559559

560-
per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module);
560+
per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php5_module);
561561
if (per_dir_conf) {
562562
zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC);
563563
}
@@ -828,7 +828,7 @@ static int php_xbithack_handler(request_rec * r)
828828
r->allowed |= (1 << METHODS) - 1;
829829
return DECLINED;
830830
}
831-
per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php4_module);
831+
per_dir_conf = (HashTable *) get_module_config(r->per_dir_config, &php5_module);
832832
if (per_dir_conf) {
833833
zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC);
834834
}
@@ -922,9 +922,9 @@ command_rec php_commands[] =
922922
};
923923
/* }}} */
924924

925-
/* {{{ odule MODULE_VAR_EXPORT php4_module
925+
/* {{{ odule MODULE_VAR_EXPORT php5_module
926926
*/
927-
module MODULE_VAR_EXPORT php4_module =
927+
module MODULE_VAR_EXPORT php5_module =
928928
{
929929
STANDARD_MODULE_STUFF,
930930
php_init_handler, /* initializer */

sapi/apache/mod_php5.exp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
php5_module
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818
/* $Id$ */
1919

20-
#ifndef MOD_PHP4_H
21-
#define MOD_PHP4_H
20+
#ifndef MOD_PHP5_H
21+
#define MOD_PHP5_H
2222

2323
#if !defined(WIN32) && !defined(WINNT)
2424
#ifndef MODULE_VAR_EXPORT
@@ -44,7 +44,7 @@ extern php_apache_info_struct php_apache_info;
4444
#define AP(v) (php_apache_info.v)
4545
#endif
4646

47-
#endif /* MOD_PHP4_H */
47+
#endif /* MOD_PHP5_H */
4848

4949
/*
5050
* Local variables:

0 commit comments

Comments
 (0)