- COM:
. Fixed missing type checks in com_event_sink (Yussuf Khalil, Stas).
+- Milter:
+ . Fixed bug #67715 (php-milter does not build and crashes randomly). (Mike)
+
- OpenSSL:
. Fixed missing type checks in OpenSSL options (Yussuf Khalil, Stas).
milter: $(SAPI_MILTER_PATH)
-$(SAPI_MILTER_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_SAPI_OBJS)
+$(SAPI_MILTER_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_MILTER_OBJS)
$(BUILD_MILTER)
install-milter: $(SAPI_MILTER_PATH)
- @$(INSTALL) -m 0755 $(SAPI_MILTER_PATH) $(bindir)/php-milter
+ @$(INSTALL) -m 0755 $(SAPI_MILTER_PATH) $(INSTALL_ROOT)$(bindir)/php-milter
SAPI_MILTER_PATH=sapi/milter/php-milter
PHP_BUILD_THREAD_SAFE
- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/milter/Makefile.frag)
+ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/milter/Makefile.frag,$abs_srcdir/sapi/milter,sapi/milter)
PHP_SELECT_SAPI(milter, program, php_milter.c getopt.c,,'$(SAPI_MILTER_PATH)')
PHP_ADD_LIBRARY_WITH_PATH(milter, $MILTERPATH,)
- BUILD_MILTER="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_MILTER_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_MILTER_PATH)"
+ BUILD_MILTER="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_MILTER_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_MILTER_PATH)"
PHP_SUBST(SAPI_MILTER_PATH)
PHP_SUBST(BUILD_MILTER)
fi
int status;
TSRMLS_FETCH();
+ if (!SG(sapi_started) && SUCCESS != php_request_startup(TSRMLS_C)) {
+ return ret;
+ }
+
/* call userland */
INIT_ZVAL(function_name);
ZVAL_STRING(&function_name, "milter_close", 0);
/* {{{ Milter entry struct
*/
-struct smfiDesc smfilter = {
+static struct smfiDesc smfilter = {
"php-milter", /* filter name */
SMFI_VERSION, /* version code -- leave untouched */
0, /* flags */
tsrm_startup(1, 1, 0, NULL);
+ tsrm_ls = ts_resource(0);
sapi_startup(&milter_sapi_module);
while ((c=ap_php_getopt(argc, argv, OPTSTRING))!=-1) {
milter_sapi_module.executable_location = argv[0];
- tsrm_ls = ts_resource(0);
sapi_module.startup(&milter_sapi_module);