Skip to content

Instantly share code, notes, and snippets.

@adsr
Created December 14, 2015 20:55
Show Gist options
  • Select an option

  • Save adsr/a3fd538b5cde40465ef3 to your computer and use it in GitHub Desktop.

Select an option

Save adsr/a3fd538b5cde40465ef3 to your computer and use it in GitHub Desktop.
* commit c256649d63322630ce2e9665ba4b57d4b0eee01e
| Author: Xinchen Hui <laruence@gmail.com>
| Date: Wed Sep 23 07:08:51 2015 -0700
|
| Fixed memleaks in apache2handler
|
| diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
| index 636eee2..b4f2097 100644
| --- a/sapi/apache2handler/apache_config.c
| +++ b/sapi/apache2handler/apache_config.c
| @@ -135,6 +135,14 @@ static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv,
| }
| }
|
| +void config_entry_ctor(zval *zv)
| +{
| + php_dir_entry *pe = (php_dir_entry*)Z_PTR_P(zv);
| + php_dir_entry *npe = malloc(sizeof(php_dir_entry));
| +
| + memcpy(npe, pe, sizeof(php_dir_entry));
| + ZVAL_PTR(zv, npe);
| +}
|
| void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
| {
| @@ -142,12 +150,10 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
|
| n = create_php_config(p, "merge_php_config");
| /* copy old config */
| - zend_hash_copy(&n->config, &d->config, NULL);
| -//??? zend_hash_copy(&n->config, &d->config, NULL, NULL, sizeof(php_dir_entry));
| + zend_hash_copy(&n->config, &d->config, config_entry_ctor);
| /* merge new config */
| phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
| - zend_hash_merge_ex(&n->config, &e->config, NULL, should_overwrite_per_dir_entry, NULL);
| -//??? zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
| + zend_hash_merge_ex(&n->config, &e->config, config_entry_ctor, should_overwrite_per_dir_entry, NULL);
| return n;
| }
|
| @@ -197,12 +203,17 @@ static apr_status_t destroy_php_config(void *data)
| return APR_SUCCESS;
| }
|
| +static void config_entry_dtor(zval *zv)
| +{
| + free((php_dir_entry*)Z_PTR_P(zv));
| +}
| +
| void *create_php_config(apr_pool_t *p, char *dummy)
| {
| php_conf_rec *newx = (php_conf_rec *) apr_pcalloc(p, sizeof(*newx));
|
| phpapdebug((stderr, "Creating new config (%p) for %s\n", newx, dummy));
| - zend_hash_init(&newx->config, 0, NULL, NULL, 1);
| + zend_hash_init(&newx->config, 0, NULL, config_entry_dtor, 1);
| apr_pool_cleanup_register(p, newx, destroy_php_config, apr_pool_cleanup_null);
| return (void *) newx;
| }
|
* commit 85a511d2c1b7d7489630d7e2d1112bddd4e20203 (origin/zend-signal-zts)
Author: Joe Watkins <krakjoe@php.net>
Date: Tue Sep 1 09:34:54 2015 +0100
fix zend signal and tsrm compat
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 42861bc..3791120 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -455,6 +455,11 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
(void)ts_resource(0);
ZEND_TSRMLS_CACHE_UPDATE();
#endif
+
+#ifdef ZEND_SIGNALS
+ zend_signal_startup();
+#endif
+
sapi_startup(&apache2_sapi_module);
apache2_sapi_module.startup(&apache2_sapi_module);
apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null);
* commit 809610f5ea38a83b284e1125d1fff129bdd615e7
Author: Stanislav Malyshev <stas@php.net>
Date: Sat Apr 4 15:03:46 2015 -0700
Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index e97f11c..cfebc5f 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -688,6 +688,7 @@ zend_first_try {
} zend_end_try();
}
apr_brigade_cleanup(brigade);
+ apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup);
} else {
ctx->r = parent_req;
}
* commit fc444fbc70cdf9d47aa335897db1bb5043ea1955
| Author: Bob Weinand <bobwei9@hotmail.com>
| Date: Fri Apr 11 19:33:56 2014 +0200
|
| Shut up, my lovely compiler; I do not like your warnings
|
| Conflicts:
| Zend/zend_object_handlers.c
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index f2c3447..088ff77 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -276,12 +276,12 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| if (!val) {
| val = "";
| }
| - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), &new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (unsigned int *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
| }
| APR_ARRAY_FOREACH_CLOSE()
|
| - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), &new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (unsigned int *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
| }
| }
|
* commit 73c1be26531f730d64d61962b56eaf28ce3fc6aa
Author: Xinchen Hui <laruence@php.net>
Date: Thu Jan 15 23:09:28 2015 +0800
Bump year
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 76d3ee2..a7dbbeb 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/mod_php5.c b/sapi/apache2handler/mod_php5.c
index 4a01ebf..b6d6c51 100644
--- a/sapi/apache2handler/mod_php5.c
+++ b/sapi/apache2handler/mod_php5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index 3484604..d0673e1 100644
--- a/sapi/apache2handler/php_apache.h
+++ b/sapi/apache2handler/php_apache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 2c57300..71002c7 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index e97f11c..f2c3447 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
* commit ca0a2e7a3cb202864c8a57a061d3dee567a7703b
| Author: Kalle Sommer Nielsen <kalle@php.net>
| Date: Sun Mar 29 06:37:07 2015 +0200
|
| Drop VC6 support in sapi/apache2handler
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index bca9d87..4eedba8 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -53,12 +53,6 @@
|
| #include "php_apache.h"
|
| -#ifdef PHP_WIN32
| -# if _MSC_VER <= 1300
| -# include "win32/php_strtoi64.h"
| -# endif
| -#endif
| -
| /* UnixWare and Netware define shutdown to _shutdown, which causes problems later
| * on when using a structure member named shutdown. Since this source
| * file does not use the system call shutdown, it is safe to #undef it.K
|
* commit fd5a756ad44124ffa7e9a5810a31ff49e91708cf
| Author: Xinchen Hui <laruence@php.net>
| Date: Thu Mar 5 18:11:22 2015 +0800
|
| Revive Zend Signals handler (and fixed bug #61083)
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index ed4c9f3..bca9d87 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -717,6 +717,9 @@ 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);
| +#ifdef ZEND_SIGNALS
| + ap_hook_child_init(zend_signal_init, NULL, NULL, APR_HOOK_MIDDLE);
| +#endif
| ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
| }
|
|
* commit af3ca74501c5d0be273e47c618d37b8ddcbb5c7f
| Author: Anatol Belski <ab@php.net>
| Date: Mon Feb 16 17:19:32 2015 +0100
|
| made ZEND_TSRMLS_CACHE_* macros look like function calls
|
| which also comply with the current semantics for such macros
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index 9ef1c7f..489892c 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -80,7 +80,7 @@ extern zend_module_entry apache2_module_entry;
| #ifdef ZTS
| extern int php_apache2_info_id;
| #define AP2(v) ZEND_TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
| -ZEND_TSRMLS_CACHE_EXTERN;
| +ZEND_TSRMLS_CACHE_EXTERN();
| #else
| extern php_apache2_info_struct php_apache2_info;
| #define AP2(v) (php_apache2_info.v)
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 4361b78..ed4c9f3 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -72,7 +72,7 @@
| /* A way to specify the location of the php.ini dir in an apache directive */
| char *apache2_php_ini_path_override = NULL;
| #if defined(PHP_WIN32) && defined(ZTS)
| -ZEND_TSRMLS_CACHE_DEFINE;
| +ZEND_TSRMLS_CACHE_DEFINE();
| #endif
|
| static size_t
| @@ -459,7 +459,7 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
| #ifdef ZTS
| tsrm_startup(1, 1, 0, NULL);
| (void)ts_resource(0);
| - ZEND_TSRMLS_CACHE_UPDATE;
| + ZEND_TSRMLS_CACHE_UPDATE();
| #endif
| sapi_startup(&apache2_sapi_module);
| apache2_sapi_module.startup(&apache2_sapi_module);
| @@ -552,7 +552,7 @@ static int php_handler(request_rec *r)
| #ifdef ZTS
| /* initial resource fetch */
| (void)ts_resource(0);
| - ZEND_TSRMLS_CACHE_UPDATE;
| + ZEND_TSRMLS_CACHE_UPDATE();
| #endif
|
| #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req);
|
* commit 61d85cedd591c7f299181ff0fbf710bddb481f9b
| Author: Anatol Belski <ab@php.net>
| Date: Wed Feb 11 11:43:27 2015 +0100
|
| fix values for gid and uid
|
| As stated by MSDN, these fields are always set to zero
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index c33e071..4361b78 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -220,8 +220,13 @@ php_apache_sapi_get_stat(void)
| {
| php_struct *ctx = SG(server_context);
|
| +#ifdef PHP_WIN32
| + ctx->finfo.st_uid = 0;
| + ctx->finfo.st_gid = 0;
| +#else
| ctx->finfo.st_uid = ctx->r->finfo.user;
| ctx->finfo.st_gid = ctx->r->finfo.group;
| +#endif
| ctx->finfo.st_dev = ctx->r->finfo.device;
| ctx->finfo.st_ino = ctx->r->finfo.inode;
| #if defined(NETWARE) && defined(CLIB_STAT_PATCH)
|
* commit e6bf9b45dd91ee4681a5a9d718286e18761c2745
| Author: Anatol Belski <ab@php.net>
| Date: Wed Feb 11 11:22:49 2015 +0100
|
| silence unused variable warning
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index f5fc786..c33e071 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -546,7 +546,7 @@ static int php_handler(request_rec *r)
| request_rec * volatile parent_req = NULL;
| #ifdef ZTS
| /* initial resource fetch */
| - void ***tsrm_ls = ts_resource(0);
| + (void)ts_resource(0);
| ZEND_TSRMLS_CACHE_UPDATE;
| #endif
|
|
* commit 1eb4352143e42784a59b55e0e531a8faecc0033d
| Author: Dmitry Stogov <dmitry@zend.com>
| Date: Tue Feb 10 15:43:12 2015 +0300
|
| Use new ZEND_HASH_FOREACH_... API.
|
| diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
| index de7546b..636eee2 100644
| --- a/sapi/apache2handler/apache_config.c
| +++ b/sapi/apache2handler/apache_config.c
| @@ -139,13 +139,6 @@ static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv,
| void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
| {
| php_conf_rec *d = base_conf, *e = new_conf, *n = NULL;
| -#if STAS_0
| - php_dir_entry *pe;
| - php_dir_entry *data;
| - char *str;
| - uint str_len;
| - ulong num_index;
| -#endif
|
| n = create_php_config(p, "merge_php_config");
| /* copy old config */
| @@ -155,20 +148,6 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
| phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
| zend_hash_merge_ex(&n->config, &e->config, NULL, should_overwrite_per_dir_entry, NULL);
| //??? zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
| -#if STAS_0
| - for (zend_hash_internal_pointer_reset(&d->config);
| - zend_hash_get_current_key(&d->config, &str, &str_len,
| - &num_index) == HASH_KEY_IS_STRING;
| - zend_hash_move_forward(&d->config)) {
| - pe = NULL;
| - zend_hash_get_current_data(&d->config, (void **) &data);
| - if (zend_hash_find(&n->config, str, str_len, (void **) &pe) == SUCCESS) {
| - if (pe->status >= data->status) continue;
| - }
| - phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", str, data->status, pe?pe->status:-1));
| - zend_hash_update(&n->config, str, str_len, data, sizeof(*data), NULL);
| - }
| -#endif
| return n;
| }
|
|
* commit fc33f52d8c25997dd0711de3e07d0dc260a18c11
| Author: Xinchen Hui <laruence@php.net>
| Date: Thu Jan 15 23:27:30 2015 +0800
|
| bump year
|
| diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
| index e1644d6..de7546b 100644
| --- a/sapi/apache2handler/apache_config.c
| +++ b/sapi/apache2handler/apache_config.c
| @@ -2,7 +2,7 @@
| +----------------------------------------------------------------------+
| | PHP Version 7 |
| +----------------------------------------------------------------------+
| - | Copyright (c) 1997-2014 The PHP Group |
| + | Copyright (c) 1997-2015 The PHP Group |
| +----------------------------------------------------------------------+
| | This source file is subject to version 3.01 of the PHP license, |
| | that is bundled with this package in the file LICENSE, and is |
| diff --git a/sapi/apache2handler/mod_php7.c b/sapi/apache2handler/mod_php7.c
| index ddc98e1..cf6fdaa 100644
| --- a/sapi/apache2handler/mod_php7.c
| +++ b/sapi/apache2handler/mod_php7.c
| @@ -2,7 +2,7 @@
| +----------------------------------------------------------------------+
| | PHP Version 7 |
| +----------------------------------------------------------------------+
| - | Copyright (c) 1997-2014 The PHP Group |
| + | Copyright (c) 1997-2015 The PHP Group |
| +----------------------------------------------------------------------+
| | This source file is subject to version 3.01 of the PHP license, |
| | that is bundled with this package in the file LICENSE, and is |
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index 8712b2b..9ef1c7f 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -2,7 +2,7 @@
| +----------------------------------------------------------------------+
| | PHP Version 7 |
| +----------------------------------------------------------------------+
| - | Copyright (c) 1997-2014 The PHP Group |
| + | Copyright (c) 1997-2015 The PHP Group |
| +----------------------------------------------------------------------+
| | This source file is subject to version 3.01 of the PHP license, |
| | that is bundled with this package in the file LICENSE, and is |
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index fd4edb2..3c4cbd9 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -2,7 +2,7 @@
| +----------------------------------------------------------------------+
| | PHP Version 7 |
| +----------------------------------------------------------------------+
| - | Copyright (c) 1997-2014 The PHP Group |
| + | Copyright (c) 1997-2015 The PHP Group |
| +----------------------------------------------------------------------+
| | This source file is subject to version 3.01 of the PHP license, |
| | that is bundled with this package in the file LICENSE, and is |
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 5336b11..f5fc786 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -2,7 +2,7 @@
| +----------------------------------------------------------------------+
| | PHP Version 7 |
| +----------------------------------------------------------------------+
| - | Copyright (c) 1997-2014 The PHP Group |
| + | Copyright (c) 1997-2015 The PHP Group |
| +----------------------------------------------------------------------+
| | This source file is subject to version 3.01 of the PHP license, |
| | that is bundled with this package in the file LICENSE, and is |
|
* commit b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc
| Author: Stanislav Malyshev <stas@php.net>
| Date: Sat Jan 3 01:22:58 2015 -0800
|
| trailing whitespace removal
|
| diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
| index 92a683b..e1644d6 100644
| --- a/sapi/apache2handler/apache_config.c
| +++ b/sapi/apache2handler/apache_config.c
| @@ -60,11 +60,11 @@ static const char *real_value_hnd(cmd_parms *cmd, void *dummy, const char *name,
| php_dir_entry e;
|
| phpapdebug((stderr, "Getting %s=%s for %p (%d)\n", name, value, dummy, zend_hash_num_elements(&d->config)));
| -
| +
| if (!strncasecmp(value, "none", sizeof("none"))) {
| value = "";
| }
| -
| +
| e.value = apr_pstrdup(cmd->pool, value);
| e.value_len = strlen(value);
| e.status = status;
| @@ -157,7 +157,7 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
| //??? zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
| #if STAS_0
| for (zend_hash_internal_pointer_reset(&d->config);
| - zend_hash_get_current_key(&d->config, &str, &str_len,
| + zend_hash_get_current_key(&d->config, &str, &str_len,
| &num_index) == HASH_KEY_IS_STRING;
| zend_hash_move_forward(&d->config)) {
| pe = NULL;
| @@ -176,7 +176,7 @@ char *get_php_config(void *conf, char *name, size_t name_len)
| {
| php_conf_rec *d = conf;
| php_dir_entry *pe;
| -
| +
| if ((pe = zend_hash_str_find_ptr(&d->config, name, name_len)) != NULL) {
| return pe->value;
| }
| @@ -189,7 +189,7 @@ void apply_config(void *dummy)
| php_conf_rec *d = dummy;
| zend_string *str;
| php_dir_entry *data;
| -
| +
| ZEND_HASH_FOREACH_STR_KEY_PTR(&d->config, str, data) {
| phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
| if (zend_alter_ini_entry_chars(str, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
| @@ -212,7 +212,7 @@ static apr_status_t destroy_php_config(void *data)
| {
| php_conf_rec *d = data;
|
| - phpapdebug((stderr, "Destroying config %p\n", data));
| + phpapdebug((stderr, "Destroying config %p\n", data));
| zend_hash_destroy(&d->config);
|
| return APR_SUCCESS;
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 2eb6a64..fd4edb2 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -59,7 +59,7 @@ php_apache2_info_struct php_apache2_info;
| static request_rec *php_apache_lookup_uri(char *filename)
| {
| php_struct *ctx = SG(server_context);
| -
| +
| if (!filename || !ctx || !ctx->r) {
| return NULL;
| }
| @@ -129,7 +129,7 @@ PHP_FUNCTION(apache_lookup_uri)
| php_error_docref(NULL, E_WARNING, "Unable to include '%s' - URI lookup failed", filename);
| RETURN_FALSE;
| }
| -
| +
| if (rr->status == HTTP_OK) {
| object_init(return_value);
|
| @@ -162,7 +162,7 @@ PHP_FUNCTION(apache_lookup_uri)
| ap_destroy_sub_req(rr);
| return;
| }
| -
| +
| php_error_docref(NULL, E_WARNING, "Unable to include '%s' - error finding URI", filename);
| ap_destroy_sub_req(rr);
| RETURN_FALSE;
| @@ -181,7 +181,7 @@ PHP_FUNCTION(apache_request_headers)
| }
|
| array_init(return_value);
| -
| +
| ctx = SG(server_context);
| arr = apr_table_elts(ctx->r->headers_in);
|
| @@ -205,7 +205,7 @@ PHP_FUNCTION(apache_response_headers)
| }
|
| array_init(return_value);
| -
| +
| ctx = SG(server_context);
| arr = apr_table_elts(ctx->r->headers_out);
|
| @@ -349,9 +349,9 @@ PHP_FUNCTION(apache_get_modules)
| {
| int n;
| char *p;
| -
| +
| array_init(return_value);
| -
| +
| for (n = 0; ap_loaded_modules[n]; ++n) {
| char *s = (char *) ap_loaded_modules[n]->name;
| if ((p = strchr(s, '.'))) {
| @@ -378,7 +378,7 @@ PHP_MINFO_FUNCTION(apache)
| AP_DECLARE_DATA extern unixd_config_rec unixd_config;
| #endif
| #endif
| -
| +
| for (n = 0; ap_loaded_modules[n]; ++n) {
| char *s = (char *) ap_loaded_modules[n]->name;
| if ((p = strchr(s, '.'))) {
| @@ -395,21 +395,21 @@ PHP_MINFO_FUNCTION(apache)
| tmp1.s->val[0] = '\0';
| }
| }
| -
| +
| php_info_print_table_start();
| if (apv && *apv) {
| php_info_print_table_row(2, "Apache Version", apv);
| }
| snprintf(tmp, sizeof(tmp), "%d", MODULE_MAGIC_NUMBER);
| php_info_print_table_row(2, "Apache API Version", tmp);
| -
| +
| if (serv->server_admin && *(serv->server_admin)) {
| php_info_print_table_row(2, "Server Administrator", serv->server_admin);
| }
| -
| +
| snprintf(tmp, sizeof(tmp), "%s:%u", serv->server_hostname, serv->port);
| php_info_print_table_row(2, "Hostname:Port", tmp);
| -
| +
| #if !defined(WIN32) && !defined(WINNT) && !defined(NETWARE)
| #if MODULE_MAGIC_NUMBER_MAJOR >= 20081201
| snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
| @@ -424,25 +424,25 @@ PHP_MINFO_FUNCTION(apache)
| php_info_print_table_row(2, "Max Requests", tmp);
|
| apr_snprintf(tmp, sizeof tmp,
| - "Connection: %" APR_TIME_T_FMT " - Keep-Alive: %" APR_TIME_T_FMT,
| + "Connection: %" APR_TIME_T_FMT " - Keep-Alive: %" APR_TIME_T_FMT,
| apr_time_sec(serv->timeout), apr_time_sec(serv->keep_alive_timeout));
| php_info_print_table_row(2, "Timeouts", tmp);
| -
| +
| php_info_print_table_row(2, "Virtual Server", (serv->is_virtual ? "Yes" : "No"));
| php_info_print_table_row(2, "Server Root", ap_server_root);
| php_info_print_table_row(2, "Loaded Modules", tmp1.s->val);
|
| smart_str_free(&tmp1);
| php_info_print_table_end();
| -
| +
| DISPLAY_INI_ENTRIES();
|
| {
| const apr_array_header_t *arr = apr_table_elts(((php_struct *) SG(server_context))->r->subprocess_env);
| char *key, *val;
| -
| +
| SECTION("Apache Environment");
| - php_info_print_table_start();
| + php_info_print_table_start();
| php_info_print_table_header(2, "Variable", "Value");
| APR_ARRAY_FOREACH_OPEN(arr, key, val)
| if (!val) {
| @@ -450,14 +450,14 @@ PHP_MINFO_FUNCTION(apache)
| }
| php_info_print_table_row(2, key, val);
| APR_ARRAY_FOREACH_CLOSE()
| -
| - php_info_print_table_end();
| -
| +
| + php_info_print_table_end();
| +
| SECTION("HTTP Headers Information");
| php_info_print_table_start();
| php_info_print_table_colspan_header(2, "HTTP Request Headers");
| php_info_print_table_row(2, "HTTP Request", ((php_struct *) SG(server_context))->r->the_request);
| -
| +
| arr = apr_table_elts(((php_struct *) SG(server_context))->r->headers_in);
| APR_ARRAY_FOREACH_OPEN(arr, key, val)
| if (!val) {
| @@ -474,7 +474,7 @@ PHP_MINFO_FUNCTION(apache)
| }
| php_info_print_table_row(2, key, val);
| APR_ARRAY_FOREACH_CLOSE()
| -
| +
| php_info_print_table_end();
| }
| }
| @@ -519,7 +519,7 @@ ZEND_END_ARG_INFO()
|
| static const zend_function_entry apache_functions[] = {
| PHP_FE(apache_lookup_uri, arginfo_apache2handler_lookup_uri)
| - PHP_FE(virtual, arginfo_apache2handler_virtual)
| + PHP_FE(virtual, arginfo_apache2handler_virtual)
| PHP_FE(apache_request_headers, arginfo_apache2handler_getallheaders)
| PHP_FE(apache_response_headers, arginfo_apache2handler_response_headers)
| PHP_FE(apache_setenv, arginfo_apache2handler_setenv)
| @@ -559,7 +559,7 @@ zend_module_entry php_apache_module = {
| PHP_MINIT(apache),
| PHP_MSHUTDOWN(apache),
| NULL,
| - NULL,
| + NULL,
| PHP_MINFO(apache),
| NULL,
| STANDARD_MODULE_PROPERTIES
|
* commit 2d212b426a22c9d9f357be0a6832ced9a3fff073
Author: Nikita Popov <nikic@php.net>
Date: Tue Dec 23 22:00:18 2014 +0100
Drop duplicate arg from hash_get_current_key_ex
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 9eed8db..92a683b 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -157,8 +157,8 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
//??? zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
#if STAS_0
for (zend_hash_internal_pointer_reset(&d->config);
- zend_hash_get_current_key_ex(&d->config, &str, &str_len,
- &num_index, 0, NULL) == HASH_KEY_IS_STRING;
+ zend_hash_get_current_key(&d->config, &str, &str_len,
+ &num_index) == HASH_KEY_IS_STRING;
zend_hash_move_forward(&d->config)) {
pe = NULL;
zend_hash_get_current_data(&d->config, (void **) &data);
* commit 61cb019e20b8af9c3cc5acdcaa925da4bea3e1ec
| Author: Remi Collet <remi@php.net>
| Date: Tue Dec 16 10:06:32 2014 +0100
|
| cleanup uneeded cast
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index fe20030..3b7eaf2 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -276,12 +276,12 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| if (!val) {
| val = "";
| }
| - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (size_t *)&new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), &new_val_len TSRMLS_CC)) {
| php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
| }
| APR_ARRAY_FOREACH_CLOSE()
|
| - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (size_t *)&new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), &new_val_len TSRMLS_CC)) {
| php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
| }
| }
|
* commit 178363cbff9cc2366b75eb11fd61473da238f7c6
| Author: Anatol Belski <ab@php.net>
| Date: Mon Dec 15 13:49:46 2014 +0100
|
| made the apache ini holders to be zend_bool
|
| since they're documented to be so and we spare 16 byte
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index f6f4f7a..22eabaa 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -70,9 +70,9 @@ void php_ap2_register_hook(apr_pool_t *p);
| #define APR_ARRAY_FOREACH_CLOSE() }}
|
| typedef struct {
| - long engine;
| - long xbithack;
| - long last_modified;
| + zend_bool engine;
| + zend_bool xbithack;
| + zend_bool last_modified;
| } php_apache2_info_struct;
|
| extern zend_module_entry apache2_module_entry;
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index d038f9e..76bbad6 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -532,9 +532,9 @@ static const zend_function_entry apache_functions[] = {
| };
|
| PHP_INI_BEGIN()
| - STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateLong, xbithack, php_apache2_info_struct, php_apache2_info)
| - STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateLong, engine, php_apache2_info_struct, php_apache2_info)
| - STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateLong, last_modified, php_apache2_info_struct, php_apache2_info)
| + STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateBool, xbithack, php_apache2_info_struct, php_apache2_info)
| + STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateBool, engine, php_apache2_info_struct, php_apache2_info)
| + STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateBool, last_modified, php_apache2_info_struct, php_apache2_info)
| PHP_INI_END()
|
| static PHP_MINIT_FUNCTION(apache)
|
| * commit bdeb220f48825642f84cdbf3ff23a30613c92e86
| Author: Anatol Belski <ab@php.net>
| Date: Sat Dec 13 23:06:14 2014 +0100
|
| first shot remove TSRMLS_* things
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index d038f9e..5225090 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -56,7 +56,7 @@ php_apache2_info_struct php_apache2_info;
|
| #define SECTION(name) PUTS("<h2>" name "</h2>\n")
|
| -static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC)
| +static request_rec *php_apache_lookup_uri(char *filename)
| {
| php_struct *ctx = SG(server_context);
|
| @@ -75,31 +75,31 @@ PHP_FUNCTION(virtual)
| size_t filename_len;
| request_rec *rr;
|
| - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
| + if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
| return;
| }
|
| - if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) {
| - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - URI lookup failed", filename);
| + if (!(rr = php_apache_lookup_uri(filename))) {
| + php_error_docref(NULL, E_WARNING, "Unable to include '%s' - URI lookup failed", filename);
| RETURN_FALSE;
| }
|
| if (rr->status != HTTP_OK) {
| - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - error finding URI", filename);
| + php_error_docref(NULL, E_WARNING, "Unable to include '%s' - error finding URI", filename);
| ap_destroy_sub_req(rr);
| RETURN_FALSE;
| }
|
| /* Flush everything. */
| - php_output_end_all(TSRMLS_C);
| - php_header(TSRMLS_C);
| + php_output_end_all();
| + php_header();
|
| /* Ensure that the ap_r* layer for the main request is flushed, to
| * work around http://issues.apache.org/bugzilla/show_bug.cgi?id=17629 */
| ap_rflush(rr->main);
|
| if (ap_run_sub_req(rr)) {
| - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - request execution failed", filename);
| + php_error_docref(NULL, E_WARNING, "Unable to include '%s' - request execution failed", filename);
| ap_destroy_sub_req(rr);
| RETURN_FALSE;
| }
| @@ -121,12 +121,12 @@ PHP_FUNCTION(apache_lookup_uri)
| char *filename;
| size_t filename_len;
|
| - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
| + if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &filename, &filename_len) == FAILURE) {
| return;
| }
|
| - if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) {
| - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - URI lookup failed", filename);
| + if (!(rr = php_apache_lookup_uri(filename))) {
| + php_error_docref(NULL, E_WARNING, "Unable to include '%s' - URI lookup failed", filename);
| RETURN_FALSE;
| }
|
| @@ -163,7 +163,7 @@ PHP_FUNCTION(apache_lookup_uri)
| return;
| }
|
| - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to include '%s' - error finding URI", filename);
| + php_error_docref(NULL, E_WARNING, "Unable to include '%s' - error finding URI", filename);
| ap_destroy_sub_req(rr);
| RETURN_FALSE;
| }
| @@ -225,7 +225,7 @@ PHP_FUNCTION(apache_note)
| size_t note_name_len, note_val_len;
| char *old_note_val=NULL;
|
| - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &note_name, &note_name_len, &note_val, &note_val_len) == FAILURE) {
| + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &note_name, &note_name_len, &note_val, &note_val_len) == FAILURE) {
| return;
| }
|
| @@ -259,7 +259,7 @@ PHP_FUNCTION(apache_setenv)
| int arg_count = ZEND_NUM_ARGS();
| request_rec *r;
|
| - if (zend_parse_parameters(arg_count TSRMLS_CC, "ss|b", &variable, &variable_len, &string_val, &string_val_len, &walk_to_top) == FAILURE) {
| + if (zend_parse_parameters(arg_count, "ss|b", &variable, &variable_len, &string_val, &string_val_len, &walk_to_top) == FAILURE) {
| return;
| }
|
| @@ -295,7 +295,7 @@ PHP_FUNCTION(apache_getenv)
| char *env_val=NULL;
| request_rec *r;
|
| - if (zend_parse_parameters(arg_count TSRMLS_CC, "s|b", &variable, &variable_len, &walk_to_top) == FAILURE) {
| + if (zend_parse_parameters(arg_count, "s|b", &variable, &variable_len, &walk_to_top) == FAILURE) {
| return;
| }
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 3b93c74..1284b3e 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -76,7 +76,7 @@ ZEND_TSRMLS_CACHE_DEFINE;
| #endif
|
| static size_t
| -php_apache_sapi_ub_write(const char *str, size_t str_length TSRMLS_DC)
| +php_apache_sapi_ub_write(const char *str, size_t str_length)
| {
| request_rec *r;
| php_struct *ctx;
| @@ -92,7 +92,7 @@ php_apache_sapi_ub_write(const char *str, size_t str_length TSRMLS_DC)
| }
|
| static int
| -php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC)
| +php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers)
| {
| php_struct *ctx;
| char *val, *ptr;
| @@ -154,7 +154,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_e
| }
|
| static int
| -php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
| +php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers)
| {
| php_struct *ctx = SG(server_context);
| const char *sline = SG(sapi_headers).http_status_line;
| @@ -174,7 +174,7 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
| /* call ap_set_content_type only once, else each time we call it,
| configured output filters for that content type will be added */
| if (!ctx->content_type) {
| - ctx->content_type = sapi_get_default_content_type(TSRMLS_C);
| + ctx->content_type = sapi_get_default_content_type();
| }
| ap_set_content_type(ctx->r, apr_pstrdup(ctx->r->pool, ctx->content_type));
| efree(ctx->content_type);
| @@ -184,7 +184,7 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
| }
|
| static apr_size_t
| -php_apache_sapi_read_post(char *buf, size_t count_bytes TSRMLS_DC)
| +php_apache_sapi_read_post(char *buf, size_t count_bytes)
| {
| apr_size_t len, tlen=0;
| php_struct *ctx = SG(server_context);
| @@ -216,7 +216,7 @@ php_apache_sapi_read_post(char *buf, size_t count_bytes TSRMLS_DC)
| }
|
| static zend_stat_t*
| -php_apache_sapi_get_stat(TSRMLS_D)
| +php_apache_sapi_get_stat(void)
| {
| php_struct *ctx = SG(server_context);
|
| @@ -241,7 +241,7 @@ php_apache_sapi_get_stat(TSRMLS_D)
| }
|
| static char *
| -php_apache_sapi_read_cookies(TSRMLS_D)
| +php_apache_sapi_read_cookies(void)
| {
| php_struct *ctx = SG(server_context);
| const char *http_cookie;
| @@ -253,7 +253,7 @@ php_apache_sapi_read_cookies(TSRMLS_D)
| }
|
| static char *
| -php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC)
| +php_apache_sapi_getenv(char *name, size_t name_len)
| {
| php_struct *ctx = SG(server_context);
| const char *env_var;
| @@ -268,7 +268,7 @@ php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC)
| }
|
| static void
| -php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| +php_apache_sapi_register_variables(zval *track_vars_array)
| {
| php_struct *ctx = SG(server_context);
| const apr_array_header_t *arr = apr_table_elts(ctx->r->subprocess_env);
| @@ -279,18 +279,18 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| if (!val) {
| val = "";
| }
| - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (size_t *)&new_val_len TSRMLS_CC)) {
| - php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
| + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (size_t *)&new_val_len)) {
| + php_register_variable_safe(key, val, new_val_len, track_vars_array);
| }
| APR_ARRAY_FOREACH_CLOSE()
|
| - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (size_t *)&new_val_len TSRMLS_CC)) {
| - php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
| + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (size_t *)&new_val_len)) {
| + php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array);
| }
| }
|
| static void
| -php_apache_sapi_flush(void *server_context TSRMLS_DC)
| +php_apache_sapi_flush(void *server_context)
| {
| php_struct *ctx;
| request_rec *r;
| @@ -305,7 +305,7 @@ php_apache_sapi_flush(void *server_context TSRMLS_DC)
|
| r = ctx->r;
|
| - sapi_send_headers(TSRMLS_C);
| + sapi_send_headers();
|
| r->status = SG(sapi_headers).http_response_code;
| SG(headers_sent) = 1;
| @@ -315,7 +315,7 @@ php_apache_sapi_flush(void *server_context TSRMLS_DC)
| }
| }
|
| -static void php_apache_sapi_log_message(char *msg TSRMLS_DC)
| +static void php_apache_sapi_log_message(char *msg)
| {
| php_struct *ctx;
|
| @@ -328,16 +328,16 @@ static void php_apache_sapi_log_message(char *msg TSRMLS_DC)
| }
| }
|
| -static void php_apache_sapi_log_message_ex(char *msg, request_rec *r TSRMLS_DC)
| +static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
| {
| if (r) {
| ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
| } else {
| - php_apache_sapi_log_message(msg TSRMLS_CC);
| + php_apache_sapi_log_message(msg);
| }
| }
|
| -static double php_apache_sapi_get_request_time(TSRMLS_D)
| +static double php_apache_sapi_get_request_time(void)
| {
| php_struct *ctx = SG(server_context);
| return ((double) apr_time_as_msec(ctx->r->request_time)) / 1000.0;
| @@ -406,7 +406,6 @@ static apr_status_t php_apache_child_shutdown(void *tmp)
|
| static void php_apache_add_version(apr_pool_t *p)
| {
| - TSRMLS_FETCH();
| if (PG(expose_php)) {
| ap_add_version_component(p, "PHP/" PHP_VERSION);
| }
| @@ -472,7 +471,7 @@ static apr_status_t php_server_context_cleanup(void *data_)
| return APR_SUCCESS;
| }
|
| -static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
| +static int php_apache_request_ctor(request_rec *r, php_struct *ctx)
| {
| char *content_length;
| const char *auth;
| @@ -499,7 +498,7 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
| apr_table_unset(r->headers_out, "ETag");
|
| auth = apr_table_get(r->headers_in, "Authorization");
| - php_handle_auth_data(auth TSRMLS_CC);
| + php_handle_auth_data(auth);
|
| if (SG(request_info).auth_user == NULL && r->user) {
| SG(request_info).auth_user = estrdup(r->user);
| @@ -507,18 +506,18 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
|
| ctx->r->user = apr_pstrdup(ctx->r->pool, SG(request_info).auth_user);
|
| - return php_request_startup(TSRMLS_C);
| + return php_request_startup();
| }
|
| -static void php_apache_request_dtor(request_rec *r TSRMLS_DC)
| +static void php_apache_request_dtor(request_rec *r)
| {
| php_request_shutdown(NULL);
| }
|
| -static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
| +static void php_apache_ini_dtor(request_rec *r, request_rec *p)
| {
| if (strcmp(r->protocol, "INCLUDED")) {
| - zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
| + zend_try { zend_ini_deactivate(); } zend_end_try();
| } else {
| typedef struct {
| HashTable config;
| @@ -551,7 +550,7 @@ static int php_handler(request_rec *r)
| ZEND_TSRMLS_CACHE_UPDATE;
| #endif
|
| -#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
| +#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req);
|
| conf = ap_get_module_config(r->per_dir_config, &php7_module);
|
| @@ -596,12 +595,12 @@ normal:
| }
|
| if (r->finfo.filetype == 0) {
| - php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r TSRMLS_CC);
| + php_apache_sapi_log_message_ex("script '%s' not found or unable to stat", r);
| PHPAP_INI_OFF;
| return HTTP_NOT_FOUND;
| }
| if (r->finfo.filetype == APR_DIR) {
| - php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r TSRMLS_CC);
| + php_apache_sapi_log_message_ex("attempt to invoke directory '%s' as script", r);
| PHPAP_INI_OFF;
| return HTTP_FORBIDDEN;
| }
| @@ -623,7 +622,7 @@ zend_first_try {
| ctx = SG(server_context);
| ctx->brigade = brigade;
|
| - if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
| + if (php_apache_request_ctor(r, ctx)!=SUCCESS) {
| zend_bailout();
| }
| } else {
| @@ -634,7 +633,7 @@ zend_first_try {
| strcmp(parent_req->handler, PHP_MAGIC_TYPE) &&
| strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) &&
| strcmp(parent_req->handler, PHP_SCRIPT)) {
| - if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) {
| + if (php_apache_request_ctor(r, ctx)!=SUCCESS) {
| zend_bailout();
| }
| }
| @@ -662,7 +661,7 @@ zend_first_try {
| if (strncmp(r->handler, PHP_SOURCE_MAGIC_TYPE, sizeof(PHP_SOURCE_MAGIC_TYPE) - 1) == 0) {
| zend_syntax_highlighter_ini syntax_highlighter_ini;
| php_get_highlight_struct(&syntax_highlighter_ini);
| - highlight_file((char *)r->filename, &syntax_highlighter_ini TSRMLS_CC);
| + highlight_file((char *)r->filename, &syntax_highlighter_ini);
| } else {
| zend_file_handle zfd;
|
| @@ -672,19 +671,19 @@ zend_first_try {
| zfd.opened_path = NULL;
|
| if (!parent_req) {
| - php_execute_script(&zfd TSRMLS_CC);
| + php_execute_script(&zfd);
| } else {
| - zend_execute_scripts(ZEND_INCLUDE TSRMLS_CC, NULL, 1, &zfd);
| + zend_execute_scripts(ZEND_INCLUDE, NULL, 1, &zfd);
| }
|
| apr_table_set(r->notes, "mod_php_memory_usage",
| - apr_psprintf(ctx->r->pool, "%" APR_SIZE_T_FMT, zend_memory_peak_usage(1 TSRMLS_CC)));
| + apr_psprintf(ctx->r->pool, "%" APR_SIZE_T_FMT, zend_memory_peak_usage(1)));
| }
|
| } zend_end_try();
|
| if (!parent_req) {
| - php_apache_request_dtor(r TSRMLS_CC);
| + php_apache_request_dtor(r);
| ctx->request_processed = 1;
| bucket = apr_bucket_eos_create(r->connection->bucket_alloc);
| APR_BRIGADE_INSERT_TAIL(brigade, bucket);
|
* commit 7be91dd730e4e832d46868d63a5f5e5a978cadfc
| Author: Nikita Popov <nikic@php.net>
| Date: Sat Dec 6 12:37:14 2014 +0100
|
| Fix zpp call in apache_getenv()
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index f32c881..d038f9e 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -288,8 +288,8 @@ PHP_FUNCTION(apache_setenv)
| PHP_FUNCTION(apache_getenv)
| {
| php_struct *ctx;
| - char *variable=NULL;
| - int variable_len;
| + char *variable;
| + size_t variable_len;
| zend_bool walk_to_top = 0;
| int arg_count = ZEND_NUM_ARGS();
| char *env_val=NULL;
|
* commit 7c5ae9a1cf3e65afadb4ba3cf50a0690e7d4d27d
| Author: Anatol Belski <ab@php.net>
| Date: Tue Nov 18 11:03:54 2014 +0100
|
| fix unsigned check
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index d9ae4d9..f32c881 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -388,8 +388,12 @@ PHP_MINFO_FUNCTION(apache)
| }
| smart_str_appendc(&tmp1, ' ');
| }
| - if (tmp1.s && (tmp1.s->len - 1) >= 0) {
| - tmp1.s->val[tmp1.s->len - 1] = '\0';
| + if (tmp1.s) {
| + if (tmp1.s->len > 0) {
| + tmp1.s->val[tmp1.s->len - 1] = '\0';
| + } else {
| + tmp1.s->val[0] = '\0';
| + }
| }
|
| php_info_print_table_start();
|
| * commit aff66a94a631b5711549395bb282f61b6f6f9e49
| | Author: Anatol Belski <ab@php.net>
| | Date: Wed Oct 15 16:55:47 2014 +0200
| |
| | don't define tsrm ls in SAPIs under linux
| |
| | as it's compiled statically with the core
| |
| | diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| | index 1234f91..3b93c74 100644
| | --- a/sapi/apache2handler/sapi_apache2.c
| | +++ b/sapi/apache2handler/sapi_apache2.c
| | @@ -71,7 +71,7 @@
| |
| | /* A way to specify the location of the php.ini dir in an apache directive */
| | char *apache2_php_ini_path_override = NULL;
| | -#ifdef ZTS
| | +#if defined(PHP_WIN32) && defined(ZTS)
| | ZEND_TSRMLS_CACHE_DEFINE;
| | #endif
| |
| |
| * commit 8aeffdd74c826b5012c9b052848cfa8e593776ed
| | Author: Anatol Belski <ab@php.net>
| | Date: Wed Oct 15 16:33:40 2014 +0200
| |
| | moved most of the core to use static tsrm ls cache pointer
| |
| | plus apache2handler, cli and cgi
| |
| | diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
| | index 59e1739..2e64b21 100644
| | --- a/sapi/apache2handler/config.m4
| | +++ b/sapi/apache2handler/config.m4
| | @@ -56,7 +56,7 @@ if test "$PHP_APXS2" != "no"; then
| | esac
| | done
| |
| | - APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS"
| | + APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
| |
| | # Test that we're trying to configure with apache 2.x
| | PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
| | diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32
| | index d15dcfa..8ea1305 100644
| | --- a/sapi/apache2handler/config.w32
| | +++ b/sapi/apache2handler/config.w32
| | @@ -13,7 +13,7 @@ if (PHP_APACHE2HANDLER != "no") {
| | ) {
| | SAPI('apache2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c',
| | 'php' + PHP_VERSION + 'apache2.dll',
| | - '/D PHP_APACHE2_EXPORTS /I win32');
| | + '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
| | } else {
| | WARNING("Could not find apache2 libraries/headers");
| | }
| | @@ -31,7 +31,7 @@ if (PHP_APACHE2_2HANDLER != "no") {
| | ) {
| | SAPI('apache2_2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c',
| | 'php' + PHP_VERSION + 'apache2_2.dll',
| | - '/D PHP_APACHE2_EXPORTS /I win32',
| | + '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1',
| | 'sapi\\apache2_2handler');
| | } else {
| | WARNING("Could not find apache2.2 libraries/headers");
| | @@ -49,7 +49,7 @@ if (PHP_APACHE2_4HANDLER != "no") {
| | ) {
| | SAPI('apache2_4handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c',
| | 'php' + PHP_VERSION + 'apache2_4.dll',
| | - '/D PHP_APACHE2_EXPORTS /I win32',
| | + '/D PHP_APACHE2_EXPORTS /I win32 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1',
| | 'sapi\\apache2handler');
| | } else {
| | WARNING("Could not find apache 2.4 libraries/headers");
| | diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| | index f6f4f7a..da20072 100644
| | --- a/sapi/apache2handler/php_apache.h
| | +++ b/sapi/apache2handler/php_apache.h
| | @@ -79,7 +79,8 @@ extern zend_module_entry apache2_module_entry;
| |
| | #ifdef ZTS
| | extern int php_apache2_info_id;
| | -#define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
| | +#define AP2(v) ZEND_TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
| | +ZEND_TSRMLS_CACHE_EXTERN;
| | #else
| | extern php_apache2_info_struct php_apache2_info;
| | #define AP2(v) (php_apache2_info.v)
| | diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| | index 6b0ab48..1234f91 100644
| | --- a/sapi/apache2handler/sapi_apache2.c
| | +++ b/sapi/apache2handler/sapi_apache2.c
| | @@ -71,6 +71,9 @@
| |
| | /* A way to specify the location of the php.ini dir in an apache directive */
| | char *apache2_php_ini_path_override = NULL;
| | +#ifdef ZTS
| | +ZEND_TSRMLS_CACHE_DEFINE;
| | +#endif
| |
| | static size_t
| | php_apache_sapi_ub_write(const char *str, size_t str_length TSRMLS_DC)
| | @@ -451,6 +454,8 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
| | }
| | #ifdef ZTS
| | tsrm_startup(1, 1, 0, NULL);
| | + (void)ts_resource(0);
| | + ZEND_TSRMLS_CACHE_UPDATE;
| | #endif
| | sapi_startup(&apache2_sapi_module);
| | apache2_sapi_module.startup(&apache2_sapi_module);
| | @@ -543,6 +548,7 @@ static int php_handler(request_rec *r)
| | #ifdef ZTS
| | /* initial resource fetch */
| | void ***tsrm_ls = ts_resource(0);
| | + ZEND_TSRMLS_CACHE_UPDATE;
| | #endif
| |
| | #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
| |
| * commit 1fc8220b6516ac6f40d81eb7cee1eefe69c7e4a0
| | Author: Anatol Belski <ab@php.net>
| | Date: Wed Oct 15 09:46:35 2014 +0200
| |
| | TSRMLS_FETCH() is a spent force
| |
| | diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| | index fe20030..6b0ab48 100644
| | --- a/sapi/apache2handler/sapi_apache2.c
| | +++ b/sapi/apache2handler/sapi_apache2.c
| | @@ -540,7 +540,10 @@ static int php_handler(request_rec *r)
| | apr_bucket *bucket;
| | apr_status_t rv;
| | request_rec * volatile parent_req = NULL;
| | - TSRMLS_FETCH();
| | +#ifdef ZTS
| | + /* initial resource fetch */
| | + void ***tsrm_ls = ts_resource(0);
| | +#endif
| |
| | #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
| |
| |
| * commit c00424e427930a33e6d8645cc3f23fb78ed29b9f
| Author: Anatol Belski <ab@php.net>
| Date: Wed Oct 15 09:37:55 2014 +0200
|
| bring back all the TSRMLS_FETCH() stuff
|
| for better comparability with the mainstream
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 5ccc774..fe20030 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -403,6 +403,7 @@ static apr_status_t php_apache_child_shutdown(void *tmp)
|
| static void php_apache_add_version(apr_pool_t *p)
| {
| + TSRMLS_FETCH();
| if (PG(expose_php)) {
| ap_add_version_component(p, "PHP/" PHP_VERSION);
| }
|
* commit 4b3e19802385c5874eefd3ba4565f2efbc55dc96
| Author: Anatol Belski <ab@php.net>
| Date: Sun Sep 28 19:02:09 2014 +0200
|
| removed *.dsw and *.dsp files
|
| diff --git a/sapi/apache2handler/php7apache2.dsp b/sapi/apache2handler/php7apache2.dsp
| deleted file mode 100644
| index d2f761c..0000000
| --- a/sapi/apache2handler/php7apache2.dsp
| +++ /dev/null
| @@ -1,146 +0,0 @@
| -# Microsoft Developer Studio Project File - Name="php7apache2" - Package Owner=<4>
| -# Microsoft Developer Studio Generated Build File, Format Version 6.00
| -# ** DO NOT EDIT **
| -
| -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
| -
| -CFG=php7apache2 - Win32 Debug_TS
| -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
| -!MESSAGE use the Export Makefile command and run
| -!MESSAGE
| -!MESSAGE NMAKE /f "php7apache2.mak".
| -!MESSAGE
| -!MESSAGE You can specify a configuration when running NMAKE
| -!MESSAGE by defining the macro CFG on the command line. For example:
| -!MESSAGE
| -!MESSAGE NMAKE /f "php7apache2.mak" CFG="php7apache2 - Win32 Debug_TS"
| -!MESSAGE
| -!MESSAGE Possible choices for configuration are:
| -!MESSAGE
| -!MESSAGE "php7apache2 - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
| -!MESSAGE "php7apache2 - Win32 Release_TS_inline" (based on "Win32 (x86) Dynamic-Link Library")
| -!MESSAGE "php7apache2 - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
| -!MESSAGE
| -
| -# Begin Project
| -# PROP AllowPerConfigDependencies 0
| -# PROP Scc_ProjName ""
| -# PROP Scc_LocalPath ""
| -CPP=cl.exe
| -MTL=midl.exe
| -RSC=rc.exe
| -
| -!IF "$(CFG)" == "php7apache2 - Win32 Release_TS"
| -
| -# PROP BASE Use_MFC 0
| -# PROP BASE Use_Debug_Libraries 0
| -# PROP BASE Output_Dir "Release_TS"
| -# PROP BASE Intermediate_Dir "Release_TS"
| -# PROP BASE Target_Dir ""
| -# PROP Use_MFC 0
| -# PROP Use_Debug_Libraries 0
| -# PROP Output_Dir "..\..\Release_TS"
| -# PROP Intermediate_Dir "Release_TS"
| -# PROP Ignore_Export_Lib 0
| -# PROP Target_Dir ""
| -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /c
| -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /c
| -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD BASE RSC /l 0x407 /d "NDEBUG"
| -# ADD RSC /l 0x407 /d "NDEBUG"
| -BSC32=bscmake.exe
| -# ADD BASE BSC32 /nologo
| -# ADD BSC32 /nologo
| -LINK32=link.exe
| -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
| -# ADD LINK32 php7ts.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /libpath:"..\..\Release_TS" /libpath:"..\..\TSRM\Release_TS" /libpath:"..\..\Zend\Release_TS"
| -
| -!ELSEIF "$(CFG)" == "php7apache2 - Win32 Release_TS_inline"
| -
| -# PROP BASE Use_MFC 0
| -# PROP BASE Use_Debug_Libraries 0
| -# PROP BASE Output_Dir "Release_TS_inline"
| -# PROP BASE Intermediate_Dir "Release_TS_inline"
| -# PROP BASE Target_Dir ""
| -# PROP Use_MFC 0
| -# PROP Use_Debug_Libraries 0
| -# PROP Output_Dir "..\..\Release_TS_inline"
| -# PROP Intermediate_Dir "Release_TS_inline"
| -# PROP Ignore_Export_Lib 0
| -# PROP Target_Dir ""
| -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /c
| -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /c
| -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD BASE RSC /l 0x407 /d "NDEBUG"
| -# ADD RSC /l 0x407 /d "NDEBUG"
| -BSC32=bscmake.exe
| -# ADD BASE BSC32 /nologo
| -# ADD BSC32 /nologo
| -LINK32=link.exe
| -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
| -# ADD LINK32 php7ts.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS_inline/php7apache2.dll" /libpath:"..\..\Release_TS_inline" /libpath:"..\..\TSRM\Release_TS_inline" /libpath:"..\..\Zend\Release_TS_inline"
| -
| -!ELSEIF "$(CFG)" == "php7apache2 - Win32 Debug_TS"
| -
| -# PROP BASE Use_MFC 0
| -# PROP BASE Use_Debug_Libraries 1
| -# PROP BASE Output_Dir "Debug_TS"
| -# PROP BASE Intermediate_Dir "Debug_TS"
| -# PROP BASE Target_Dir ""
| -# PROP Use_MFC 0
| -# PROP Use_Debug_Libraries 1
| -# PROP Output_Dir "..\..\Debug_TS"
| -# PROP Intermediate_Dir "Debug_TS"
| -# PROP Target_Dir ""
| -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /GZ /c
| -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
| -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
| -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
| -# ADD BASE RSC /l 0x407 /d "_DEBUG"
| -# ADD RSC /l 0x407 /d "_DEBUG"
| -BSC32=bscmake.exe
| -# ADD BASE BSC32 /nologo
| -# ADD BSC32 /nologo
| -LINK32=link.exe
| -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
| -# ADD LINK32 php7ts_debug.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"..\..\TSRM\Debug_TS" /libpath:"..\..\Zend\Debug_TS"
| -
| -!ENDIF
| -
| -# Begin Target
| -
| -# Name "php7apache2 - Win32 Release_TS"
| -# Name "php7apache2 - Win32 Release_TS_inline"
| -# Name "php7apache2 - Win32 Debug_TS"
| -# Begin Group "Source Files"
| -
| -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
| -# Begin Source File
| -
| -SOURCE=.\apache_config.c
| -# End Source File
| -# Begin Source File
| -
| -SOURCE=.\mod_php7.c
| -# End Source File
| -# Begin Source File
| -
| -SOURCE=.\php_functions.c
| -# End Source File
| -# Begin Source File
| -
| -SOURCE=.\sapi_apache2.c
| -# End Source File
| -# End Group
| -# Begin Group "Header Files"
| -
| -# PROP Default_Filter "h;hpp;hxx;hm;inl"
| -# Begin Source File
| -
| -SOURCE=.\php_apache.h
| -# End Source File
| -# End Group
| -# End Target
| -# End Project
|
| * commit 21b6d15599a23a03afa5a7df779b03c6823dc4ba
| | Author: krakjoe <joe.watkins@live.co.uk>
| | Date: Fri Sep 26 09:23:50 2014 +0100
| |
| | remove unused fetch
| |
| | diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| | index fe20030..5ccc774 100644
| | --- a/sapi/apache2handler/sapi_apache2.c
| | +++ b/sapi/apache2handler/sapi_apache2.c
| | @@ -403,7 +403,6 @@ static apr_status_t php_apache_child_shutdown(void *tmp)
| |
| | static void php_apache_add_version(apr_pool_t *p)
| | {
| | - TSRMLS_FETCH();
| | if (PG(expose_php)) {
| | ap_add_version_component(p, "PHP/" PHP_VERSION);
| | }
| |
| * commit d11734b4b00f57de80d931ad1c522e00082443af
| | Author: Anatol Belski <ab@php.net>
| | Date: Thu Sep 25 18:48:27 2014 +0200
| |
| | reworked the patch, less new stuff but worky
| |
| | TLS is already used in TSRM, the way exporting the tsrm cache through
| | a thread local variable is not portable. Additionally, the current
| | patch suffers from bugs which are hard to find, but prevent it to
| | be worky with apache. What is done here is mainly uses the idea
| | from the RFC patch, but
| |
| | - __thread variable is removed
| | - offset math and declarations are removed
| | - extra macros and definitions are removed
| |
| | What is done merely is
| |
| | - use an inline function to access the tsrm cache. The function uses
| | the portable tsrm_tls_get macro which is cheap
| | - all the TSRM_* macros are set to placebo. Thus this opens the way
| | remove them later
| |
| | Except that, the logic is old. TSRMLS_FETCH will have to be done once
| | per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
| | worky are cli, cli server and apache. I also tried to enable bz2
| | shared and it has worked out of the box. The change is yet minimal
| | diffing to the current master bus is a worky start, IMHO. Though will
| | have to recheck the other previously done SAPIs - embed and cgi.
| |
| | The offsets can be added to the tsrm_resource_type struct, then
| | it'll not be needed to declare them in the userspace. Even the
| | "done" member type can be changed to int16 or smaller, then adding
| | the offset as int16 will not change the struct size. As well on the
| | todo might be removing the hashed storage, thread_id != thread_id and
| | linked list logic in favour of the explicit TLS operations.
| |
| | diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| | index 26ddf22..f6f4f7a 100644
| | --- a/sapi/apache2handler/php_apache.h
| | +++ b/sapi/apache2handler/php_apache.h
| | @@ -78,7 +78,7 @@ typedef struct {
| | extern zend_module_entry apache2_module_entry;
| |
| | #ifdef ZTS
| | -TSRMG_DHE(php_apache2_info_struct, php_apache2_info_id);
| | +extern int php_apache2_info_id;
| | #define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
| | #else
| | extern php_apache2_info_struct php_apache2_info;
| | diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| | index 3fc88ed..d9ae4d9 100644
| | --- a/sapi/apache2handler/php_functions.c
| | +++ b/sapi/apache2handler/php_functions.c
| | @@ -49,7 +49,7 @@
| | #include "php_apache.h"
| |
| | #ifdef ZTS
| | -TSRMG_DE(php_apache2_info_struct, php_apache2_info_id);
| | +int php_apache2_info_id;
| | #else
| | php_apache2_info_struct php_apache2_info;
| | #endif
| | @@ -536,7 +536,7 @@ PHP_INI_END()
| | static PHP_MINIT_FUNCTION(apache)
| | {
| | #ifdef ZTS
| | - TSRMG_ALLOCATE(php_apache2_info_id, sizeof(php_apache2_info_struct), NULL, NULL);
| | + ts_allocate_id(&php_apache2_info_id, sizeof(php_apache2_info_struct), (ts_allocate_ctor) NULL, NULL);
| | #endif
| | REGISTER_INI_ENTRIES();
| | return SUCCESS;
| | diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| | index 86372e1..fe20030 100644
| | --- a/sapi/apache2handler/sapi_apache2.c
| | +++ b/sapi/apache2handler/sapi_apache2.c
| | @@ -451,7 +451,6 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
| | }
| | #ifdef ZTS
| | tsrm_startup(1, 1, 0, NULL);
| | - TSRMLS_INIT();
| | #endif
| | sapi_startup(&apache2_sapi_module);
| | apache2_sapi_module.startup(&apache2_sapi_module);
| | @@ -541,7 +540,7 @@ static int php_handler(request_rec *r)
| | apr_bucket *bucket;
| | apr_status_t rv;
| | request_rec * volatile parent_req = NULL;
| | - TSRMLS_INIT();
| | + TSRMLS_FETCH();
| |
| | #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
| |
| |
| * commit 4db75dc8533a69e8849651ab5d0fa84efa3d8bba
| Author: Anatol Belski <ab@php.net>
| Date: Mon Sep 22 20:58:45 2014 +0200
|
| basic windows fix
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index 674eb9f..26ddf22 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -78,7 +78,7 @@ typedef struct {
| extern zend_module_entry apache2_module_entry;
|
| #ifdef ZTS
| -TSRMG_DH(php_apache2_info_struct, php_apache2_info_id);
| +TSRMG_DHE(php_apache2_info_struct, php_apache2_info_id);
| #define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
| #else
| extern php_apache2_info_struct php_apache2_info;
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 9529b70..3fc88ed 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -49,7 +49,7 @@
| #include "php_apache.h"
|
| #ifdef ZTS
| -TSRMG_D(php_apache2_info_struct, php_apache2_info_id);
| +TSRMG_DE(php_apache2_info_struct, php_apache2_info_id);
| #else
| php_apache2_info_struct php_apache2_info;
| #endif
|
* commit e33f3d3b7c9a69fe069484045a27d282aa98b00e
| Author: Nikita Popov <nikic@php.net>
| Date: Sat Sep 20 22:42:02 2014 +0200
|
| Move smart_str implementation into Zend/
|
| So we can use it there as well...
|
| For now I've retained the zend_smart_str_public.h header, though
| it would probably be better to just move that one struct into
| zend_types.h.
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 27643b8..d9ae4d9 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -21,7 +21,7 @@
| #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
|
| #include "php.h"
| -#include "ext/standard/php_smart_str.h"
| +#include "zend_smart_str.h"
| #include "ext/standard/info.h"
| #include "ext/standard/head.h"
| #include "php_ini.h"
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 08e6caf..fe20030 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -30,7 +30,7 @@
|
| #include <fcntl.h>
|
| -#include "ext/standard/php_smart_str.h"
| +#include "zend_smart_str.h"
| #ifndef NETWARE
| #include "ext/standard/php_standard.h"
| #else
|
| * commit b3aebda9eaf55706af2e21178f229a171725a168
|/ Author: krakjoe <joe.watkins@live.co.uk>
| Date: Sat Sep 20 20:22:14 2014 +0100
|
| native tls initial patch
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index f6f4f7a..674eb9f 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -78,7 +78,7 @@ typedef struct {
| extern zend_module_entry apache2_module_entry;
|
| #ifdef ZTS
| -extern int php_apache2_info_id;
| +TSRMG_DH(php_apache2_info_struct, php_apache2_info_id);
| #define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
| #else
| extern php_apache2_info_struct php_apache2_info;
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 27643b8..c79af0e 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -49,7 +49,7 @@
| #include "php_apache.h"
|
| #ifdef ZTS
| -int php_apache2_info_id;
| +TSRMG_D(php_apache2_info_struct, php_apache2_info_id);
| #else
| php_apache2_info_struct php_apache2_info;
| #endif
| @@ -536,7 +536,7 @@ PHP_INI_END()
| static PHP_MINIT_FUNCTION(apache)
| {
| #ifdef ZTS
| - ts_allocate_id(&php_apache2_info_id, sizeof(php_apache2_info_struct), (ts_allocate_ctor) NULL, NULL);
| + TSRMG_ALLOCATE(php_apache2_info_id, sizeof(php_apache2_info_struct), NULL, NULL);
| #endif
| REGISTER_INI_ENTRIES();
| return SUCCESS;
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 08e6caf..f993b47 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -451,6 +451,7 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
| }
| #ifdef ZTS
| tsrm_startup(1, 1, 0, NULL);
| + TSRMLS_INIT();
| #endif
| sapi_startup(&apache2_sapi_module);
| apache2_sapi_module.startup(&apache2_sapi_module);
| @@ -540,7 +541,7 @@ static int php_handler(request_rec *r)
| apr_bucket *bucket;
| apr_status_t rv;
| request_rec * volatile parent_req = NULL;
| - TSRMLS_FETCH();
| + TSRMLS_INIT();
|
| #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
|
|
* commit b0064fc27f6b4aab6cf365c84985d225eeff7b24
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:30:17 2014 -0400
|
| Update sapi_apache2.c
|
| Change of php5 for php7
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index aed7741..08e6caf 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -1,6 +1,6 @@
| /*
| +----------------------------------------------------------------------+
| - | PHP Version 5 |
| + | PHP Version 7 |
| +----------------------------------------------------------------------+
| | Copyright (c) 1997-2014 The PHP Group |
| +----------------------------------------------------------------------+
| @@ -67,7 +67,7 @@
|
| #define PHP_MAGIC_TYPE "application/x-httpd-php"
| #define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source"
| -#define PHP_SCRIPT "php5-script"
| +#define PHP_SCRIPT "php7-script"
|
| /* A way to specify the location of the php.ini dir in an apache directive */
| char *apache2_php_ini_path_override = NULL;
| @@ -519,7 +519,7 @@ typedef struct {
| HashTable config;
| } php_conf_rec;
| zend_string *str;
| - php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php5_module);
| + php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php7_module);
|
| ZEND_HASH_FOREACH_STR_KEY(&c->config, str) {
| zend_restore_ini_entry(str, ZEND_INI_STAGE_SHUTDOWN);
| @@ -544,7 +544,7 @@ static int php_handler(request_rec *r)
|
| #define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
|
| - conf = ap_get_module_config(r->per_dir_config, &php5_module);
| + conf = ap_get_module_config(r->per_dir_config, &php7_module);
|
| /* apply_config() needs r in some cases, so allocate server_context early */
| ctx = SG(server_context);
|
* commit 1d936e7054a8180e2f00a57116c76da594ddd677
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:26:03 2014 -0400
|
| Update php_functions.c
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 084f411..27643b8 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -1,6 +1,6 @@
| /*
| +----------------------------------------------------------------------+
| - | PHP Version 5 |
| + | PHP Version 7 |
| +----------------------------------------------------------------------+
| | Copyright (c) 1997-2014 The PHP Group |
| +----------------------------------------------------------------------+
|
* commit 5514b0b1ad1f68a8c2bd75f4ea3424d4a38df508
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:25:23 2014 -0400
|
| Update php_apache.h
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index f1033c9..f6f4f7a 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -1,6 +1,6 @@
| /*
| +----------------------------------------------------------------------+
| - | PHP Version 5 |
| + | PHP Version 7 |
| +----------------------------------------------------------------------+
| | Copyright (c) 1997-2014 The PHP Group |
| +----------------------------------------------------------------------+
| @@ -29,7 +29,7 @@
| #include "main/php_streams.h"
|
| /* Declare this so we can get to it from outside the sapi_apache2.c file */
| -extern module AP_MODULE_DECLARE_DATA php5_module;
| +extern module AP_MODULE_DECLARE_DATA php7_module;
|
| /* A way to specify the location of the php.ini dir in an apache directive */
| extern char *apache2_php_ini_path_override;
|
* commit 637a0069aa712ebce3add88e9cedd81b03fc80d8
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:24:46 2014 -0400
|
| Update and rename php5apache2.dsp to php7apache2.dsp
|
| Change of php5 for php7
|
| diff --git a/sapi/apache2handler/php5apache2.dsp b/sapi/apache2handler/php5apache2.dsp
| deleted file mode 100644
| index 40cd58c..0000000
| --- a/sapi/apache2handler/php5apache2.dsp
| +++ /dev/null
| @@ -1,146 +0,0 @@
| -# Microsoft Developer Studio Project File - Name="php5apache2" - Package Owner=<4>
| -# Microsoft Developer Studio Generated Build File, Format Version 6.00
| -# ** DO NOT EDIT **
| -
| -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
| -
| -CFG=php5apache2 - Win32 Debug_TS
| -!MESSAGE This is not a valid makefile. To build this project using NMAKE,
| -!MESSAGE use the Export Makefile command and run
| -!MESSAGE
| -!MESSAGE NMAKE /f "php5apache2.mak".
| -!MESSAGE
| -!MESSAGE You can specify a configuration when running NMAKE
| -!MESSAGE by defining the macro CFG on the command line. For example:
| -!MESSAGE
| -!MESSAGE NMAKE /f "php5apache2.mak" CFG="php5apache2 - Win32 Debug_TS"
| -!MESSAGE
| -!MESSAGE Possible choices for configuration are:
| -!MESSAGE
| -!MESSAGE "php5apache2 - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
| -!MESSAGE "php5apache2 - Win32 Release_TS_inline" (based on "Win32 (x86) Dynamic-Link Library")
| -!MESSAGE "php5apache2 - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
| -!MESSAGE
| -
| -# Begin Project
| -# PROP AllowPerConfigDependencies 0
| -# PROP Scc_ProjName ""
| -# PROP Scc_LocalPath ""
| -CPP=cl.exe
| -MTL=midl.exe
| -RSC=rc.exe
| -
| -!IF "$(CFG)" == "php5apache2 - Win32 Release_TS"
| -
| -# PROP BASE Use_MFC 0
| -# PROP BASE Use_Debug_Libraries 0
| -# PROP BASE Output_Dir "Release_TS"
| -# PROP BASE Intermediate_Dir "Release_TS"
| -# PROP BASE Target_Dir ""
| -# PROP Use_MFC 0
| -# PROP Use_Debug_Libraries 0
| -# PROP Output_Dir "..\..\Release_TS"
| -# PROP Intermediate_Dir "Release_TS"
| -# PROP Ignore_Export_Lib 0
| -# PROP Target_Dir ""
| -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /c
| -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /c
| -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD BASE RSC /l 0x407 /d "NDEBUG"
| -# ADD RSC /l 0x407 /d "NDEBUG"
| -BSC32=bscmake.exe
| -# ADD BASE BSC32 /nologo
| -# ADD BSC32 /nologo
| -LINK32=link.exe
| -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
| -# ADD LINK32 php5ts.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /libpath:"..\..\Release_TS" /libpath:"..\..\TSRM\Release_TS" /libpath:"..\..\Zend\Release_TS"
| -
| -!ELSEIF "$(CFG)" == "php5apache2 - Win32 Release_TS_inline"
| -
| -# PROP BASE Use_MFC 0
| -# PROP BASE Use_Debug_Libraries 0
| -# PROP BASE Output_Dir "Release_TS_inline"
| -# PROP BASE Intermediate_Dir "Release_TS_inline"
| -# PROP BASE Target_Dir ""
| -# PROP Use_MFC 0
| -# PROP Use_Debug_Libraries 0
| -# PROP Output_Dir "..\..\Release_TS_inline"
| -# PROP Intermediate_Dir "Release_TS_inline"
| -# PROP Ignore_Export_Lib 0
| -# PROP Target_Dir ""
| -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /c
| -# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /c
| -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| -# ADD BASE RSC /l 0x407 /d "NDEBUG"
| -# ADD RSC /l 0x407 /d "NDEBUG"
| -BSC32=bscmake.exe
| -# ADD BASE BSC32 /nologo
| -# ADD BSC32 /nologo
| -LINK32=link.exe
| -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
| -# ADD LINK32 php5ts.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS_inline/php5apache2.dll" /libpath:"..\..\Release_TS_inline" /libpath:"..\..\TSRM\Release_TS_inline" /libpath:"..\..\Zend\Release_TS_inline"
| -
| -!ELSEIF "$(CFG)" == "php5apache2 - Win32 Debug_TS"
| -
| -# PROP BASE Use_MFC 0
| -# PROP BASE Use_Debug_Libraries 1
| -# PROP BASE Output_Dir "Debug_TS"
| -# PROP BASE Intermediate_Dir "Debug_TS"
| -# PROP BASE Target_Dir ""
| -# PROP Use_MFC 0
| -# PROP Use_Debug_Libraries 1
| -# PROP Output_Dir "..\..\Debug_TS"
| -# PROP Intermediate_Dir "Debug_TS"
| -# PROP Target_Dir ""
| -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /GZ /c
| -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
| -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
| -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
| -# ADD BASE RSC /l 0x407 /d "_DEBUG"
| -# ADD RSC /l 0x407 /d "_DEBUG"
| -BSC32=bscmake.exe
| -# ADD BASE BSC32 /nologo
| -# ADD BSC32 /nologo
| -LINK32=link.exe
| -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
| -# ADD LINK32 php5ts_debug.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"..\..\TSRM\Debug_TS" /libpath:"..\..\Zend\Debug_TS"
| -
| -!ENDIF
| -
| -# Begin Target
| -
| -# Name "php5apache2 - Win32 Release_TS"
| -# Name "php5apache2 - Win32 Release_TS_inline"
| -# Name "php5apache2 - Win32 Debug_TS"
| -# Begin Group "Source Files"
| -
| -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
| -# Begin Source File
| -
| -SOURCE=.\apache_config.c
| -# End Source File
| -# Begin Source File
| -
| -SOURCE=.\mod_php5.c
| -# End Source File
| -# Begin Source File
| -
| -SOURCE=.\php_functions.c
| -# End Source File
| -# Begin Source File
| -
| -SOURCE=.\sapi_apache2.c
| -# End Source File
| -# End Group
| -# Begin Group "Header Files"
| -
| -# PROP Default_Filter "h;hpp;hxx;hm;inl"
| -# Begin Source File
| -
| -SOURCE=.\php_apache.h
| -# End Source File
| -# End Group
| -# End Target
| -# End Project
| diff --git a/sapi/apache2handler/php7apache2.dsp b/sapi/apache2handler/php7apache2.dsp
| new file mode 100644
| index 0000000..d2f761c
| --- /dev/null
| +++ b/sapi/apache2handler/php7apache2.dsp
| @@ -0,0 +1,146 @@
| +# Microsoft Developer Studio Project File - Name="php7apache2" - Package Owner=<4>
| +# Microsoft Developer Studio Generated Build File, Format Version 6.00
| +# ** DO NOT EDIT **
| +
| +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
| +
| +CFG=php7apache2 - Win32 Debug_TS
| +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
| +!MESSAGE use the Export Makefile command and run
| +!MESSAGE
| +!MESSAGE NMAKE /f "php7apache2.mak".
| +!MESSAGE
| +!MESSAGE You can specify a configuration when running NMAKE
| +!MESSAGE by defining the macro CFG on the command line. For example:
| +!MESSAGE
| +!MESSAGE NMAKE /f "php7apache2.mak" CFG="php7apache2 - Win32 Debug_TS"
| +!MESSAGE
| +!MESSAGE Possible choices for configuration are:
| +!MESSAGE
| +!MESSAGE "php7apache2 - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
| +!MESSAGE "php7apache2 - Win32 Release_TS_inline" (based on "Win32 (x86) Dynamic-Link Library")
| +!MESSAGE "php7apache2 - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
| +!MESSAGE
| +
| +# Begin Project
| +# PROP AllowPerConfigDependencies 0
| +# PROP Scc_ProjName ""
| +# PROP Scc_LocalPath ""
| +CPP=cl.exe
| +MTL=midl.exe
| +RSC=rc.exe
| +
| +!IF "$(CFG)" == "php7apache2 - Win32 Release_TS"
| +
| +# PROP BASE Use_MFC 0
| +# PROP BASE Use_Debug_Libraries 0
| +# PROP BASE Output_Dir "Release_TS"
| +# PROP BASE Intermediate_Dir "Release_TS"
| +# PROP BASE Target_Dir ""
| +# PROP Use_MFC 0
| +# PROP Use_Debug_Libraries 0
| +# PROP Output_Dir "..\..\Release_TS"
| +# PROP Intermediate_Dir "Release_TS"
| +# PROP Ignore_Export_Lib 0
| +# PROP Target_Dir ""
| +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /c
| +# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /c
| +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| +# ADD BASE RSC /l 0x407 /d "NDEBUG"
| +# ADD RSC /l 0x407 /d "NDEBUG"
| +BSC32=bscmake.exe
| +# ADD BASE BSC32 /nologo
| +# ADD BSC32 /nologo
| +LINK32=link.exe
| +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
| +# ADD LINK32 php7ts.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /libpath:"..\..\Release_TS" /libpath:"..\..\TSRM\Release_TS" /libpath:"..\..\Zend\Release_TS"
| +
| +!ELSEIF "$(CFG)" == "php7apache2 - Win32 Release_TS_inline"
| +
| +# PROP BASE Use_MFC 0
| +# PROP BASE Use_Debug_Libraries 0
| +# PROP BASE Output_Dir "Release_TS_inline"
| +# PROP BASE Intermediate_Dir "Release_TS_inline"
| +# PROP BASE Target_Dir ""
| +# PROP Use_MFC 0
| +# PROP Use_Debug_Libraries 0
| +# PROP Output_Dir "..\..\Release_TS_inline"
| +# PROP Intermediate_Dir "Release_TS_inline"
| +# PROP Ignore_Export_Lib 0
| +# PROP Target_Dir ""
| +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /c
| +# ADD CPP /nologo /MD /W3 /GX /O2 /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "NDEBUG" /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /c
| +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
| +# ADD BASE RSC /l 0x407 /d "NDEBUG"
| +# ADD RSC /l 0x407 /d "NDEBUG"
| +BSC32=bscmake.exe
| +# ADD BASE BSC32 /nologo
| +# ADD BSC32 /nologo
| +LINK32=link.exe
| +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
| +# ADD LINK32 php7ts.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS_inline/php7apache2.dll" /libpath:"..\..\Release_TS_inline" /libpath:"..\..\TSRM\Release_TS_inline" /libpath:"..\..\Zend\Release_TS_inline"
| +
| +!ELSEIF "$(CFG)" == "php7apache2 - Win32 Debug_TS"
| +
| +# PROP BASE Use_MFC 0
| +# PROP BASE Use_Debug_Libraries 1
| +# PROP BASE Output_Dir "Debug_TS"
| +# PROP BASE Intermediate_Dir "Debug_TS"
| +# PROP BASE Target_Dir ""
| +# PROP Use_MFC 0
| +# PROP Use_Debug_Libraries 1
| +# PROP Output_Dir "..\..\Debug_TS"
| +# PROP Intermediate_Dir "Debug_TS"
| +# PROP Target_Dir ""
| +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PHP_APACHE2_EXPORTS" /YX /FD /GZ /c
| +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "...\..\include" /I "..\..\win32" /I "..\..\Zend" /I "..\.." /I "..\..\..\bindlib_w32" /I "..\..\main" /I "..\..\TSRM" /D "_DEBUG" /D ZEND_DEBUG=1 /D "ZTS" /D "ZEND_WIN32" /D "PHP_WIN32" /D "_WINDOWS" /D "_USRDLL" /D "WIN32" /D "_MBCS" /YX /FD /GZ /c
| +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
| +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
| +# ADD BASE RSC /l 0x407 /d "_DEBUG"
| +# ADD RSC /l 0x407 /d "_DEBUG"
| +BSC32=bscmake.exe
| +# ADD BASE BSC32 /nologo
| +# ADD BSC32 /nologo
| +LINK32=link.exe
| +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
| +# ADD LINK32 php7ts_debug.lib libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\Debug_TS" /libpath:"..\..\TSRM\Debug_TS" /libpath:"..\..\Zend\Debug_TS"
| +
| +!ENDIF
| +
| +# Begin Target
| +
| +# Name "php7apache2 - Win32 Release_TS"
| +# Name "php7apache2 - Win32 Release_TS_inline"
| +# Name "php7apache2 - Win32 Debug_TS"
| +# Begin Group "Source Files"
| +
| +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
| +# Begin Source File
| +
| +SOURCE=.\apache_config.c
| +# End Source File
| +# Begin Source File
| +
| +SOURCE=.\mod_php7.c
| +# End Source File
| +# Begin Source File
| +
| +SOURCE=.\php_functions.c
| +# End Source File
| +# Begin Source File
| +
| +SOURCE=.\sapi_apache2.c
| +# End Source File
| +# End Group
| +# Begin Group "Header Files"
| +
| +# PROP Default_Filter "h;hpp;hxx;hm;inl"
| +# Begin Source File
| +
| +SOURCE=.\php_apache.h
| +# End Source File
| +# End Group
| +# End Target
| +# End Project
|
* commit f8aeb6fc43c8735e07fc9c23b020efe070167180
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:21:40 2014 -0400
|
| Update php.sym
|
| Change of php5 for php7
|
| diff --git a/sapi/apache2handler/php.sym b/sapi/apache2handler/php.sym
| index 9ad0f0a..1469b03 100644
| --- a/sapi/apache2handler/php.sym
| +++ b/sapi/apache2handler/php.sym
| @@ -1 +1 @@
| -php5_module
| +php7_module
|
* commit 0e4ab8456a5a92644345d12107a2fdece2b4c5f4
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:21:09 2014 -0400
|
| Update and rename mod_php5.c to mod_php7.c
|
| Change of php5 for php7
|
| diff --git a/sapi/apache2handler/mod_php5.c b/sapi/apache2handler/mod_php5.c
| deleted file mode 100644
| index 4a01ebf..0000000
| --- a/sapi/apache2handler/mod_php5.c
| +++ /dev/null
| @@ -1,45 +0,0 @@
| -/*
| - +----------------------------------------------------------------------+
| - | PHP Version 5 |
| - +----------------------------------------------------------------------+
| - | Copyright (c) 1997-2014 The PHP Group |
| - +----------------------------------------------------------------------+
| - | This source file is subject to version 3.01 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_01.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$ */
| -
| -#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
| -
| -#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
| - */
| diff --git a/sapi/apache2handler/mod_php7.c b/sapi/apache2handler/mod_php7.c
| new file mode 100644
| index 0000000..ddc98e1
| --- /dev/null
| +++ b/sapi/apache2handler/mod_php7.c
| @@ -0,0 +1,45 @@
| +/*
| + +----------------------------------------------------------------------+
| + | PHP Version 7 |
| + +----------------------------------------------------------------------+
| + | Copyright (c) 1997-2014 The PHP Group |
| + +----------------------------------------------------------------------+
| + | This source file is subject to version 3.01 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_01.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$ */
| +
| +#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
| +
| +#include "php.h"
| +#include "php_apache.h"
| +
| +AP_MODULE_DECLARE_DATA module php7_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
| + */
|
* commit e5e94e0d2ef96eed35c7c7140a72f199d764e7cd
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:20:18 2014 -0400
|
| Update config.w32
|
| Change of php5 for php7
|
| diff --git a/sapi/apache2handler/config.w32 b/sapi/apache2handler/config.w32
| index a754751..d15dcfa 100644
| --- a/sapi/apache2handler/config.w32
| +++ b/sapi/apache2handler/config.w32
| @@ -11,7 +11,7 @@ if (PHP_APACHE2HANDLER != "no") {
| CHECK_LIB("libapr.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2") &&
| CHECK_LIB("libaprutil.lib", "apache2handler", PHP_PHP_BUILD + "\\lib\\apache2")
| ) {
| - SAPI('apache2handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
| + SAPI('apache2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c',
| 'php' + PHP_VERSION + 'apache2.dll',
| '/D PHP_APACHE2_EXPORTS /I win32');
| } else {
| @@ -29,7 +29,7 @@ if (PHP_APACHE2_2HANDLER != "no") {
| CHECK_LIB("libapr-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2") &&
| CHECK_LIB("libaprutil-1.lib", "apache2_2handler", PHP_PHP_BUILD + "\\lib\\apache2_2")
| ) {
| - SAPI('apache2_2handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
| + SAPI('apache2_2handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c',
| 'php' + PHP_VERSION + 'apache2_2.dll',
| '/D PHP_APACHE2_EXPORTS /I win32',
| 'sapi\\apache2_2handler');
| @@ -47,7 +47,7 @@ if (PHP_APACHE2_4HANDLER != "no") {
| CHECK_LIB("libapr-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
| CHECK_LIB("libaprutil-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4")
| ) {
| - SAPI('apache2_4handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
| + SAPI('apache2_4handler', 'mod_php7.c sapi_apache2.c apache_config.c php_functions.c',
| 'php' + PHP_VERSION + 'apache2_4.dll',
| '/D PHP_APACHE2_EXPORTS /I win32',
| 'sapi\\apache2handler');
|
* commit 51e343d5d74e6e1fc93eaf608d75f50c088a9335
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:19:20 2014 -0400
|
| Update config.m4
|
| Change of php5 for php7
|
| diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
| index a0080a6..59e1739 100644
| --- a/sapi/apache2handler/config.m4
| +++ b/sapi/apache2handler/config.m4
| @@ -70,20 +70,20 @@ if test "$PHP_APXS2" != "no"; then
| if test -z `$APXS -q SYSCONFDIR`; then
| INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
| $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
| - -i -n php5"
| + -i -n php7"
| else
| APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
| INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
| \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
| $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
| -S SYSCONFDIR='$APXS_SYSCONFDIR' \
| - -i -a -n php5"
| + -i -a -n php7"
| fi
|
| case $host_alias in
| *aix*)
| EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
| - PHP_SELECT_SAPI(apache2handler, shared, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| + PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
| ;;
| *darwin*)
| @@ -99,7 +99,7 @@ if test "$PHP_APXS2" != "no"; then
| fi
| MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
| PHP_SUBST(MH_BUNDLE_FLAGS)
| - PHP_SELECT_SAPI(apache2handler, bundle, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| + PHP_SELECT_SAPI(apache2handler, bundle, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| SAPI_SHARED=libs/libphp7.so
| INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
| ;;
| @@ -107,11 +107,11 @@ if test "$PHP_APXS2" != "no"; then
| if test -f _APP_; then `rm _APP_`; fi
| `ln -s $APXS_BINDIR/httpd _APP_`
| EXTRA_LIBS="$EXTRA_LIBS _APP_"
| - PHP_SELECT_SAPI(apache2handler, shared, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| + PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
| ;;
| *)
| - PHP_SELECT_SAPI(apache2handler, shared, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| + PHP_SELECT_SAPI(apache2handler, shared, mod_php7.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
| ;;
| esac
|
* commit eed9fdb98153877217edc017e0f99f5341ec8b5f
| Author: jfha73 <jfha73@gmail.com>
| Date: Thu Sep 18 13:17:36 2014 -0400
|
| Update apache_config.c
|
| diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
| index 09d42b5..9eed8db 100644
| --- a/sapi/apache2handler/apache_config.c
| +++ b/sapi/apache2handler/apache_config.c
| @@ -1,6 +1,6 @@
| /*
| +----------------------------------------------------------------------+
| - | PHP Version 5 |
| + | PHP Version 7 |
| +----------------------------------------------------------------------+
| | Copyright (c) 1997-2014 The PHP Group |
| +----------------------------------------------------------------------+
|
* commit 341ff0dea5065176fbcb53505c2a5c845a252c8c
| Author: Anatol Belski <ab@php.net>
| Date: Wed Sep 17 21:46:48 2014 +0200
|
| fix macro usage
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index ad5e4db..aed7741 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -482,7 +482,11 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
| r->no_local_copy = 1;
|
| content_length = (char *) apr_table_get(r->headers_in, "Content-Length");
| - SG(request_info).content_length = (content_length ? ZEND_ATOL(content_length) : 0);
| + if (content_length) {
| + ZEND_ATOL(SG(request_info).content_length, content_length);
| + } else {
| + SG(request_info).content_length = 0;
| + }
|
| apr_table_unset(r->headers_out, "Content-Length");
| apr_table_unset(r->headers_out, "Last-Modified");
|
* commit b5406ed3167512f156e74c1bbd422d26ade271fa
| Author: Anatol Belski <ab@php.net>
| Date: Wed Sep 17 20:43:23 2014 +0200
|
| fix atol usage
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index d39a25a..ad5e4db 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -482,7 +482,7 @@ static int php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
| r->no_local_copy = 1;
|
| content_length = (char *) apr_table_get(r->headers_in, "Content-Length");
| - SG(request_info).content_length = (content_length ? atol(content_length) : 0);
| + SG(request_info).content_length = (content_length ? ZEND_ATOL(content_length) : 0);
|
| apr_table_unset(r->headers_out, "Content-Length");
| apr_table_unset(r->headers_out, "Last-Modified");
|
* commit d18803eb5fcbcde78da6ed5d41921dea073c6806
| Author: Stanislav Malyshev <stas@php.net>
| Date: Mon Sep 1 14:49:52 2014 -0700
|
| fix apache handler build
|
| diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
| index 5302afc..09d42b5 100644
| --- a/sapi/apache2handler/apache_config.c
| +++ b/sapi/apache2handler/apache_config.c
| @@ -192,7 +192,7 @@ void apply_config(void *dummy)
|
| ZEND_HASH_FOREACH_STR_KEY_PTR(&d->config, str, data) {
| phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
| - if (zend_alter_ini_entry(str, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
| + if (zend_alter_ini_entry_chars(str, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
| phpapdebug((stderr, "..FAILED\n"));
| }
| } ZEND_HASH_FOREACH_END();
|
* commit 88099a0a27b8c95cf665f6c932672d2b25d305c4
| Author: Christopher Jones <sixd@php.net>
| Date: Fri Aug 29 08:47:10 2014 -0700
|
| Allow PHP 7 to install in Apache 2 on OS X
|
| This fixes the fundamental part of #67910. The complete change from
| php5 -> php7 in sapi/* still needs to be done.
|
| diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
| index 02f8a0b..a0080a6 100644
| --- a/sapi/apache2handler/config.m4
| +++ b/sapi/apache2handler/config.m4
| @@ -100,7 +100,7 @@ if test "$PHP_APXS2" != "no"; then
| MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
| PHP_SUBST(MH_BUNDLE_FLAGS)
| PHP_SELECT_SAPI(apache2handler, bundle, mod_php5.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
| - SAPI_SHARED=libs/libphp5.so
| + SAPI_SHARED=libs/libphp7.so
| INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
| ;;
| *beos*)
|
* commit 3234480827b27ff5d3469a732167afd289632a96
| Author: Anatol Belski <ab@php.net>
| Date: Wed Aug 27 15:31:48 2014 +0200
|
| first show to make 's' work with size_t
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 4bc8fe8..084f411 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -72,7 +72,7 @@ static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC)
| PHP_FUNCTION(virtual)
| {
| char *filename;
| - int filename_len;
| + size_t filename_len;
| request_rec *rr;
|
| if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
| @@ -119,7 +119,7 @@ PHP_FUNCTION(apache_lookup_uri)
| {
| request_rec *rr;
| char *filename;
| - int filename_len;
| + size_t filename_len;
|
| if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &filename, &filename_len) == FAILURE) {
| return;
| @@ -222,7 +222,7 @@ PHP_FUNCTION(apache_note)
| {
| php_struct *ctx;
| char *note_name, *note_val = NULL;
| - int note_name_len, note_val_len;
| + size_t note_name_len, note_val_len;
| char *old_note_val=NULL;
|
| if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &note_name, &note_name_len, &note_val, &note_val_len) == FAILURE) {
| @@ -254,7 +254,7 @@ PHP_FUNCTION(apache_setenv)
| {
| php_struct *ctx;
| char *variable=NULL, *string_val=NULL;
| - int variable_len, string_val_len;
| + size_t variable_len, string_val_len;
| zend_bool walk_to_top = 0;
| int arg_count = ZEND_NUM_ARGS();
| request_rec *r;
|
* commit 4d997f63d98c663b2d9acccd3655572652f61c7d
| Author: Anatol Belski <ab@php.net>
| Date: Mon Aug 25 20:22:49 2014 +0200
|
| master renames phase 3
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index 10b4186..f1033c9 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -43,7 +43,7 @@ typedef struct php_struct {
| #if defined(NETWARE) && defined(CLIB_STAT_PATCH)
| struct stat_libc finfo;
| #else
| - php_stat_t finfo;
| + zend_stat_t finfo;
| #endif
| /* Whether or not we've processed PHP in the output filters yet. */
| int request_processed;
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 669f25f..d39a25a 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -72,8 +72,8 @@
| /* A way to specify the location of the php.ini dir in an apache directive */
| char *apache2_php_ini_path_override = NULL;
|
| -static php_size_t
| -php_apache_sapi_ub_write(const char *str, php_size_t str_length TSRMLS_DC)
| +static size_t
| +php_apache_sapi_ub_write(const char *str, size_t str_length TSRMLS_DC)
| {
| request_rec *r;
| php_struct *ctx;
| @@ -181,7 +181,7 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
| }
|
| static apr_size_t
| -php_apache_sapi_read_post(char *buf, php_size_t count_bytes TSRMLS_DC)
| +php_apache_sapi_read_post(char *buf, size_t count_bytes TSRMLS_DC)
| {
| apr_size_t len, tlen=0;
| php_struct *ctx = SG(server_context);
| @@ -212,7 +212,7 @@ php_apache_sapi_read_post(char *buf, php_size_t count_bytes TSRMLS_DC)
| return tlen;
| }
|
| -static php_stat_t*
| +static zend_stat_t*
| php_apache_sapi_get_stat(TSRMLS_D)
| {
| php_struct *ctx = SG(server_context);
| @@ -270,18 +270,18 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| php_struct *ctx = SG(server_context);
| const apr_array_header_t *arr = apr_table_elts(ctx->r->subprocess_env);
| char *key, *val;
| - php_size_t new_val_len;
| + size_t new_val_len;
|
| APR_ARRAY_FOREACH_OPEN(arr, key, val)
| if (!val) {
| val = "";
| }
| - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (php_size_t *)&new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (size_t *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
| }
| APR_ARRAY_FOREACH_CLOSE()
|
| - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (php_size_t *)&new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (size_t *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
| }
| }
|
* commit c3e3c98ec666812daaaca896cf5ef758a8a6df14
| Author: Anatol Belski <ab@php.net>
| Date: Mon Aug 25 19:24:55 2014 +0200
|
| master renames phase 1
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 675bb78..4bc8fe8 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -109,9 +109,9 @@ PHP_FUNCTION(virtual)
| /* }}} */
|
| #define ADD_LONG(name) \
| - add_property_int(return_value, #name, rr->name)
| + add_property_long(return_value, #name, rr->name)
| #define ADD_TIME(name) \
| - add_property_int(return_value, #name, apr_time_sec(rr->name));
| + add_property_long(return_value, #name, apr_time_sec(rr->name));
| #define ADD_STRING(name) \
| if (rr->name) add_property_string(return_value, #name, (char *) rr->name)
|
|
* commit fdbbe5fa30ce524d9b0a8b376561d598bf0eb80c
| Author: Anatol Belski <ab@php.net>
| Date: Wed Aug 20 09:52:23 2014 +0200
|
| fixed some incompatible types
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index 10b61cc..669f25f 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -276,12 +276,12 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| if (!val) {
| val = "";
| }
| - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (unsigned int *)&new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (php_size_t *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
| }
| APR_ARRAY_FOREACH_CLOSE()
|
| - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (unsigned int *)&new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (php_size_t *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
| }
| }
|
* commit 61c8af6a9d4376e5f233db775e4a0ebf47942830
| Author: Anatol Belski <ab@php.net>
| Date: Tue Aug 19 23:39:22 2014 +0200
|
| ported apache handler
|
| diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
| index 3484604..10b4186 100644
| --- a/sapi/apache2handler/php_apache.h
| +++ b/sapi/apache2handler/php_apache.h
| @@ -25,6 +25,9 @@
| #include "http_config.h"
| #include "http_core.h"
|
| +#include "php.h"
| +#include "main/php_streams.h"
| +
| /* Declare this so we can get to it from outside the sapi_apache2.c file */
| extern module AP_MODULE_DECLARE_DATA php5_module;
|
| @@ -40,7 +43,7 @@ typedef struct php_struct {
| #if defined(NETWARE) && defined(CLIB_STAT_PATCH)
| struct stat_libc finfo;
| #else
| - struct stat finfo;
| + php_stat_t finfo;
| #endif
| /* Whether or not we've processed PHP in the output filters yet. */
| int request_processed;
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index ebcc3e9..10b61cc 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -72,8 +72,8 @@
| /* A way to specify the location of the php.ini dir in an apache directive */
| char *apache2_php_ini_path_override = NULL;
|
| -static int
| -php_apache_sapi_ub_write(const char *str, uint str_length TSRMLS_DC)
| +static php_size_t
| +php_apache_sapi_ub_write(const char *str, php_size_t str_length TSRMLS_DC)
| {
| request_rec *r;
| php_struct *ctx;
| @@ -180,8 +180,8 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
| return SAPI_HEADER_SENT_SUCCESSFULLY;
| }
|
| -static int
| -php_apache_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC)
| +static apr_size_t
| +php_apache_sapi_read_post(char *buf, php_size_t count_bytes TSRMLS_DC)
| {
| apr_size_t len, tlen=0;
| php_struct *ctx = SG(server_context);
| @@ -212,7 +212,7 @@ php_apache_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC)
| return tlen;
| }
|
| -static struct stat*
| +static php_stat_t*
| php_apache_sapi_get_stat(TSRMLS_D)
| {
| php_struct *ctx = SG(server_context);
| @@ -270,7 +270,7 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| php_struct *ctx = SG(server_context);
| const apr_array_header_t *arr = apr_table_elts(ctx->r->subprocess_env);
| char *key, *val;
| - int new_val_len;
| + php_size_t new_val_len;
|
| APR_ARRAY_FOREACH_OPEN(arr, key, val)
| if (!val) {
|
* commit 63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc
| Author: Anatol Belski <ab@php.net>
| Date: Tue Aug 19 08:07:31 2014 +0200
|
| basic macro replacements, all at once
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 4bc8fe8..675bb78 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -109,9 +109,9 @@ PHP_FUNCTION(virtual)
| /* }}} */
|
| #define ADD_LONG(name) \
| - add_property_long(return_value, #name, rr->name)
| + add_property_int(return_value, #name, rr->name)
| #define ADD_TIME(name) \
| - add_property_long(return_value, #name, apr_time_sec(rr->name));
| + add_property_int(return_value, #name, apr_time_sec(rr->name));
| #define ADD_STRING(name) \
| if (rr->name) add_property_string(return_value, #name, (char *) rr->name)
|
|
* commit 9d21bef39f46f162f47c6619f65008c83d15896d
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 6 13:26:23 2014 +0400
Added support for apache and apache2handler SAPIs (They seem slower than FastCGI)
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 76d3ee2..5302afc 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -70,7 +70,7 @@ static const char *real_value_hnd(cmd_parms *cmd, void *dummy, const char *name,
e.status = status;
e.htaccess = ((cmd->override & (RSRC_CONF|ACCESS_CONF)) == 0);
- zend_hash_update(&d->config, (char *) name, strlen(name) + 1, &e, sizeof(e), NULL);
+ zend_hash_str_update_mem(&d->config, (char *) name, strlen(name), &e, sizeof(e));
return NULL;
}
@@ -117,11 +117,12 @@ static const char *php_apache_phpini_set(cmd_parms *cmd, void *mconfig, const ch
return NULL;
}
-static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, php_dir_entry *new_per_dir_entry, zend_hash_key *hash_key, void *pData)
+static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv, zend_hash_key *hash_key, void *pData)
{
+ php_dir_entry *new_per_dir_entry = Z_PTR_P(zv);
php_dir_entry *orig_per_dir_entry;
- if (zend_hash_find(target_ht, hash_key->arKey, hash_key->nKeyLength, (void **) &orig_per_dir_entry)==FAILURE) {
+ if ((orig_per_dir_entry = zend_hash_find_ptr(target_ht, hash_key->key)) == NULL) {
return 1; /* does not exist in dest, copy from source */
}
@@ -148,10 +149,12 @@ void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
n = create_php_config(p, "merge_php_config");
/* copy old config */
- zend_hash_copy(&n->config, &d->config, NULL, NULL, sizeof(php_dir_entry));
+ zend_hash_copy(&n->config, &d->config, NULL);
+//??? zend_hash_copy(&n->config, &d->config, NULL, NULL, sizeof(php_dir_entry));
/* merge new config */
phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
- zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
+ zend_hash_merge_ex(&n->config, &e->config, NULL, should_overwrite_per_dir_entry, NULL);
+//??? zend_hash_merge_ex(&n->config, &e->config, NULL, sizeof(php_dir_entry), (merge_checker_func_t) should_overwrite_per_dir_entry, NULL);
#if STAS_0
for (zend_hash_internal_pointer_reset(&d->config);
zend_hash_get_current_key_ex(&d->config, &str, &str_len,
@@ -174,7 +177,7 @@ char *get_php_config(void *conf, char *name, size_t name_len)
php_conf_rec *d = conf;
php_dir_entry *pe;
- if (zend_hash_find(&d->config, name, name_len, (void **) &pe) == SUCCESS) {
+ if ((pe = zend_hash_str_find_ptr(&d->config, name, name_len)) != NULL) {
return pe->value;
}
@@ -184,21 +187,15 @@ char *get_php_config(void *conf, char *name, size_t name_len)
void apply_config(void *dummy)
{
php_conf_rec *d = dummy;
- char *str;
- uint str_len;
+ zend_string *str;
php_dir_entry *data;
- for (zend_hash_internal_pointer_reset(&d->config);
- zend_hash_get_current_key_ex(&d->config, &str, &str_len, NULL, 0,
- NULL) == HASH_KEY_IS_STRING;
- zend_hash_move_forward(&d->config)) {
- if (zend_hash_get_current_data(&d->config, (void **) &data) == SUCCESS) {
- phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
- if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
- phpapdebug((stderr, "..FAILED\n"));
- }
+ ZEND_HASH_FOREACH_STR_KEY_PTR(&d->config, str, data) {
+ phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
+ if (zend_alter_ini_entry(str, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
+ phpapdebug((stderr, "..FAILED\n"));
}
- }
+ } ZEND_HASH_FOREACH_END();
}
const command_rec php_dir_cmds[] =
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index c6bed48..4bc8fe8 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -238,7 +238,7 @@ PHP_FUNCTION(apache_note)
}
if (old_note_val) {
- RETURN_STRING(old_note_val, 1);
+ RETURN_STRING(old_note_val);
}
RETURN_FALSE;
@@ -313,7 +313,7 @@ PHP_FUNCTION(apache_getenv)
env_val = (char*) apr_table_get(r->subprocess_env, variable);
if (env_val != NULL) {
- RETURN_STRING(env_val, 1);
+ RETURN_STRING(env_val);
}
RETURN_FALSE;
@@ -336,7 +336,7 @@ PHP_FUNCTION(apache_get_version)
char *apv = php_apache_get_version();
if (apv && *apv) {
- RETURN_STRING(apv, 1);
+ RETURN_STRING(apv);
} else {
RETURN_FALSE;
}
@@ -388,8 +388,8 @@ PHP_MINFO_FUNCTION(apache)
}
smart_str_appendc(&tmp1, ' ');
}
- if ((tmp1.len - 1) >= 0) {
- tmp1.c[tmp1.len - 1] = '\0';
+ if (tmp1.s && (tmp1.s->len - 1) >= 0) {
+ tmp1.s->val[tmp1.s->len - 1] = '\0';
}
php_info_print_table_start();
@@ -426,7 +426,7 @@ PHP_MINFO_FUNCTION(apache)
php_info_print_table_row(2, "Virtual Server", (serv->is_virtual ? "Yes" : "No"));
php_info_print_table_row(2, "Server Root", ap_server_root);
- php_info_print_table_row(2, "Loaded Modules", tmp1.c);
+ php_info_print_table_row(2, "Loaded Modules", tmp1.s->val);
smart_str_free(&tmp1);
php_info_print_table_end();
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index dfb5eac..ebcc3e9 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -514,16 +514,12 @@ static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
typedef struct {
HashTable config;
} php_conf_rec;
- char *str;
- uint str_len;
+ zend_string *str;
php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php5_module);
- for (zend_hash_internal_pointer_reset(&c->config);
- zend_hash_get_current_key_ex(&c->config, &str, &str_len, NULL, 0, NULL) == HASH_KEY_IS_STRING;
- zend_hash_move_forward(&c->config)
- ) {
- zend_restore_ini_entry(str, str_len, ZEND_INI_STAGE_SHUTDOWN);
- }
+ ZEND_HASH_FOREACH_STR_KEY(&c->config, str) {
+ zend_restore_ini_entry(str, ZEND_INI_STAGE_SHUTDOWN);
+ } ZEND_HASH_FOREACH_END();
}
if (p) {
((php_struct *)SG(server_context))->r = p;
* commit 99d1a1bb3f96364d1ee7bf3e9c84215001200112
| Author: Bob Weinand <bobwei9@hotmail.com>
| Date: Fri Apr 11 19:33:56 2014 +0200
|
| Shut up, my lovely compiler; I do not like your warnings
|
| diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
| index d2b3a32..cbf79a7 100644
| --- a/sapi/apache2handler/sapi_apache2.c
| +++ b/sapi/apache2handler/sapi_apache2.c
| @@ -276,12 +276,12 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
| if (!val) {
| val = "";
| }
| - if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), &new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, key, &val, strlen(val), (unsigned int *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC);
| }
| APR_ARRAY_FOREACH_CLOSE()
|
| - if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), &new_val_len TSRMLS_CC)) {
| + if (sapi_module.input_filter(PARSE_SERVER, "PHP_SELF", &ctx->r->uri, strlen(ctx->r->uri), (unsigned int *)&new_val_len TSRMLS_CC)) {
| php_register_variable_safe("PHP_SELF", ctx->r->uri, new_val_len, track_vars_array TSRMLS_CC);
| }
| }
|
| * commit 050d7e38ad4163e7fa65e26724d3516ce7b33601
| Author: Dmitry Stogov <dmitry@zend.com>
| Date: Tue Apr 15 15:40:40 2014 +0400
|
| Cleanup (1-st round)
|
| diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
| index 2c57300..c6bed48 100644
| --- a/sapi/apache2handler/php_functions.c
| +++ b/sapi/apache2handler/php_functions.c
| @@ -113,7 +113,7 @@ PHP_FUNCTION(virtual)
| #define ADD_TIME(name) \
| add_property_long(return_value, #name, apr_time_sec(rr->name));
| #define ADD_STRING(name) \
| - if (rr->name) add_property_string(return_value, #name, (char *) rr->name, 1)
| + if (rr->name) add_property_string(return_value, #name, (char *) rr->name)
|
| PHP_FUNCTION(apache_lookup_uri)
| {
| @@ -187,7 +187,7 @@ PHP_FUNCTION(apache_request_headers)
|
| APR_ARRAY_FOREACH_OPEN(arr, key, val)
| if (!val) val = "";
| - add_assoc_string(return_value, key, val, 1);
| + add_assoc_string(return_value, key, val);
| APR_ARRAY_FOREACH_CLOSE()
| }
| /* }}} */
| @@ -211,7 +211,7 @@ PHP_FUNCTION(apache_response_headers)
|
| APR_ARRAY_FOREACH_OPEN(arr, key, val)
| if (!val) val = "";
| - add_assoc_string(return_value, key, val, 1);
| + add_assoc_string(return_value, key, val);
| APR_ARRAY_FOREACH_CLOSE()
| }
| /* }}} */
| @@ -355,9 +355,9 @@ PHP_FUNCTION(apache_get_modules)
| for (n = 0; ap_loaded_modules[n]; ++n) {
| char *s = (char *) ap_loaded_modules[n]->name;
| if ((p = strchr(s, '.'))) {
| - add_next_index_stringl(return_value, s, (p - s), 1);
| + add_next_index_stringl(return_value, s, (p - s));
| } else {
| - add_next_index_string(return_value, s, 1);
| + add_next_index_string(return_value, s);
| }
| }
| }
|
* commit c081ce628f0d76d44784d7bb8e06428b06142ac0
Author: Xinchen Hui <laruence@php.net>
Date: Fri Jan 3 11:08:10 2014 +0800
Bump year
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 2b51939..76d3ee2 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/mod_php5.c b/sapi/apache2handler/mod_php5.c
index 56ef1bc..4a01ebf 100644
--- a/sapi/apache2handler/mod_php5.c
+++ b/sapi/apache2handler/mod_php5.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index 8bc4608..3484604 100644
--- a/sapi/apache2handler/php_apache.h
+++ b/sapi/apache2handler/php_apache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 1f79a53..2c57300 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index b7f95e0..d2b3a32 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
* commit ed5a8d510f6e4ae865008fe711efbbc5452adf42
Author: Kalle Sommer Nielsen <kalle@php.net>
Date: Wed Dec 18 09:06:39 2013 +0100
Pass the TSRMLS parameters to the sapi flush hook, this shaves off a few TSRMLS_FETCH() calls in our various SAPIs
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index b7f95e0..cf1a83f 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -287,11 +287,10 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
}
static void
-php_apache_sapi_flush(void *server_context)
+php_apache_sapi_flush(void *server_context TSRMLS_DC)
{
php_struct *ctx;
request_rec *r;
- TSRMLS_FETCH();
ctx = server_context;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment