summaryrefslogtreecommitdiff
path: root/sapi/apache2handler
diff options
context:
space:
mode:
authorAndrea Faulds <ajf@ajf.me>2014-09-16 13:45:06 +0100
committerAndrea Faulds <ajf@ajf.me>2014-09-16 13:45:06 +0100
commitdb72160e5ac2b267b9ffa23ad84e62e609382a44 (patch)
tree6e50c2826f98308d500cc826934a503751d4d566 /sapi/apache2handler
parentbe88d0e5d4ab5fdf775f3e38cf054aa0451f0d36 (diff)
parentf469dc7429f2257aac6f46228302408608fbd62f (diff)
downloadphp-git-db72160e5ac2b267b9ffa23ad84e62e609382a44.tar.gz
Merge branch 'master' into integer_semantics
Conflicts: Zend/zend_operators.h
Diffstat (limited to 'sapi/apache2handler')
-rw-r--r--sapi/apache2handler/apache_config.c2
-rw-r--r--sapi/apache2handler/config.m42
-rw-r--r--sapi/apache2handler/php_apache.h5
-rw-r--r--sapi/apache2handler/php_functions.c8
-rw-r--r--sapi/apache2handler/sapi_apache2.c16
5 files changed, 18 insertions, 15 deletions
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 5302afcf18..09d42b5440 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();
diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
index 02f8a0b3ad..a0080a654a 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*)
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index 34846048b0..f1033c9539 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;
+ 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/php_functions.c b/sapi/apache2handler/php_functions.c
index 4bc8fe8872..084f411c2f 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;
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index ebcc3e9bc9..d39a25a74e 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 size_t
+php_apache_sapi_ub_write(const char *str, 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, 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 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;
- int 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), (unsigned int *)&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), (unsigned int *)&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);
}
}