case $host_alias in
*aix*)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
- PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
+ PHP_SELECT_SAPI(apache2handler, shared, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
;;
*darwin*)
fi
MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
PHP_SUBST(MH_BUNDLE_FLAGS)
- PHP_SELECT_SAPI(apache2handler, bundle, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
+ PHP_SELECT_SAPI(apache2handler, bundle, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
SAPI_SHARED=libs/libphp5.so
INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
;;
if test -f _APP_; then `rm _APP_`; fi
`ln -s $APXS_BINDIR/httpd _APP_`
EXTRA_LIBS="$EXTRA_LIBS _APP_"
- PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
+ PHP_SELECT_SAPI(apache2handler, shared, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
;;
*)
- PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
+ PHP_SELECT_SAPI(apache2handler, shared, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
;;
esac
--- /dev/null
+/*
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2003 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_0.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Sascha Schumann <sascha@schumann.cx> |
+ | Parts based on Apache 1.3 SAPI module by |
+ | Rasmus Lerdorf and Zeev Suraski |
+ +----------------------------------------------------------------------+
+ */
+
+/* $Id$ */
+
+#include "php.h"
+#include "php_apache.h"
+
+AP_MODULE_DECLARE_DATA module php5_module = {
+ STANDARD20_MODULE_STUFF,
+ create_php_config, /* create per-directory config structure */
+ merge_php_config, /* merge per-directory config structures */
+ NULL, /* create per-server config structure */
+ NULL, /* merge per-server config structures */
+ php_dir_cmds, /* command apr_table_t */
+ php_ap2_register_hook /* register hooks */
+};
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
+ */
# End Source File\r
# Begin Source File\r
\r
+SOURCE=.\mod_php5.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\php_functions.c\r
# End Source File\r
# Begin Source File\r
char *get_php_config(void *conf, char *name, size_t name_len);
void apply_config(void *);
extern const command_rec php_dir_cmds[];
+void php_ap2_register_hook(apr_pool_t *p);
#define APR_ARRAY_FOREACH_OPEN(arr, key, val) \
{ \
#define PHP_MAGIC_TYPE "application/x-httpd-php"
#define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source"
-#define PHP_SCRIPT "php-script"
+#define PHP_SCRIPT "php5-script"
/* A way to specify the location of the php.ini dir in an apache directive */
char *apache2_php_ini_path_override = NULL;
return OK;
}
-static void php_register_hook(apr_pool_t *p)
+void php_ap2_register_hook(apr_pool_t *p)
{
ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_handler(php_handler, NULL, NULL, APR_HOOK_MIDDLE);
}
-AP_MODULE_DECLARE_DATA module php5_module = {
- STANDARD20_MODULE_STUFF,
- create_php_config, /* create per-directory config structure */
- merge_php_config, /* merge per-directory config structures */
- NULL, /* create per-server config structure */
- NULL, /* merge per-server config structures */
- php_dir_cmds, /* command apr_table_t */
- php_register_hook /* register hooks */
-};
-
/*
* Local variables:
* tab-width: 4